Content-type: text/html

<HTML><HEAD><TITLE>Manpage of zfs</TITLE>
</HEAD><BODY>
<H1>zfs</H1>
Section: System Administration Commands (8)<BR>Updated: Nov 19, 2013<BR>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DL>
<DT><A HREF="#lbAE">ZFS File System Hierarchy</A><DD>
<DT><A HREF="#lbAF">Snapshots</A><DD>
<DT><A HREF="#lbAG">Bookmarks</A><DD>
<DT><A HREF="#lbAH">Clones</A><DD>
<DT><A HREF="#lbAI">Mount Points</A><DD>
<DT><A HREF="#lbAJ">Deduplication</A><DD>
<DT><A HREF="#lbAK">Native Properties</A><DD>
<DT><A HREF="#lbAL">Temporary Mount Point Properties</A><DD>
<DT><A HREF="#lbAM">User Properties</A><DD>
<DT><A HREF="#lbAN">ZFS Volumes as Swap</A><DD>
</DL>
<DT><A HREF="#lbAO">SUBCOMMANDS</A><DD>
<DT><A HREF="#lbAP">EXAMPLES</A><DD>
<DT><A HREF="#lbAQ">ENVIRONMENT VARIABLES</A><DD>
<DT><A HREF="#lbAR">EXIT STATUS</A><DD>
<DT><A HREF="#lbAS">SEE ALSO</A><DD>
</DL>
<HR>
<A HREF="../index.html">Return to Main Contents</A><HR>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

zfs - configures ZFS file systems
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<P>

<PRE>
<B>zfs</B> [<B>-?</B>]
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>create</B> [<B>-p</B>] [<B>-o</B> <I>property</I>=<I>value</I>] ... <I>filesystem</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>create</B> [<B>-ps</B>] [<B>-b</B> <I>blocksize</I>] [<B>-o</B> <I>property</I>=<I>value</I>] ... <B>-V</B> <I>size</I> <I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>destroy</B> [<B>-fnpRrv</B>] <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>destroy</B> [<B>-dnpRrv</B>] <I>filesystem</I>|<I>volume</I>@<I>snap</I>[%<I>snap</I>][,...]
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>destroy</B> <I>filesystem</I>|<I>volume</I>#<I>bookmark</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>snapshot | snap</B> [<B>-r</B>] [<B>-o</B> <I>property</I>=<I>value</I>] ... 
      <I>filesystem@snapname</A></I>|<I><A HREF="mailto:volume@snapname">volume@snapname</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>rollback</B> [<B>-rRf</B>] <I>snapshot</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>clone</B> [<B>-p</B>] [<B>-o</B> <I>property</I>=<I>value</I>] ... <I>snapshot</I> <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>promote</B> <I>clone-filesystem</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>rename</B> [<B>-f</B>] <I>filesystem</I>|<I>volume</I>|<I>snapshot</I>
     <I>filesystem</I>|<I>volume</I>|<I>snapshot</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>rename</B> [<B>-fp</B>] <I>filesystem</I>|<I>volume</I> <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>rename</B> <B>-r</B> <I>snapshot</I> <I>snapshot</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>list</B> [<B>-r</B>|<B>-d</B> <I>depth</I>][<B>-Hp</B>][<B>-o</B> <I>property</I>[,<I>property</I>]...] [<B>-t</B> <I>type</I>[,<I>type</I>]..]
     [<B>-s</B> <I>property</I>] ... [<B>-S</B> <I>property</I>] ... [<I>filesystem</I>|<I>volume</I>|<I>snapshot</I>] ...
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>set</B> <I>property</I>=<I>value</I> <I>filesystem</I>|<I>volume</I>|<I>snapshot</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>get</B> [<B>-r</B>|<B>-d</B> <I>depth</I>][<B>-Hp</B>][<B>-o</B> <I>field</I>[,...]] [<B>-t</B> <I>type</I>[,...]] 
    [<B>-s</B> <I>source</I>[,...]] &quot;<I>all</I>&quot; | <I>property</I>[,...] <I>filesystem</I>|<I>volume</I>|<I>snapshot</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>inherit</B> [<B>-rS</B>] <I>property</I> <I>filesystem</I>|<I>volume|snapshot</I> ...
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>upgrade</B> [<B>-v</B>]
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>upgrade</B> [<B>-r</B>] [<B>-V</B> <I>version</I>] <B>-a</B> | <I>filesystem</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>userspace</B> [<B>-Hinp</B>] [<B>-o</B> <I>field</I>[,...]] [<B>-s</B> <I>field</I>] ...
    [<B>-S</B> <I>field</I>] ... [<B>-t</B> <I>type</I>[,...]] <I>filesystem</I>|<I>snapshot</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>groupspace</B> [<B>-Hinp</B>] [<B>-o</B> <I>field</I>[,...]] [<B>-s</B> <I>field</I>] ...
    [<B>-S</B> <I>field</I>] ... [<B>-t</B> <I>type</I>[,...]] <I>filesystem</I>|<I>snapshot</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>mount</B> 
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>mount</B> [<B>-vO</B>] [<B>-o </B><I>options</I>] <B>-a</B> | <I>filesystem</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>unmount | umount</B> [<B>-f</B>] <B>-a</B> | <I>filesystem</I>|<I>mountpoint</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>share</B> <B>-a</B> | <I>filesystem</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>unshare</B> <B>-a</B> <I>filesystem</I>|<I>mountpoint</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>bookmark</B> <I>snapshot</I> <I>bookmark</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>send</B> [<B>-DnPpRveL</B>] [<B>-</B>[<B>iI</B>] <I>snapshot</I>] <I>snapshot</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>send</B> [<B>-eL</B>] [<B>-i </B><I>snapshot</I>|<I>bookmark</I>] <I>filesystem</I>|<I>volume</I>|<I>snapshot</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>receive | recv</B> [<B>-vnFu</B>] <I>filesystem</I>|<I>volume</I>|<I>snapshot</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>receive | recv</B> [<B>-vnFu</B>] [<B>-d</B>|<B>-e</B>] <I>filesystem</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>allow</B> <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>allow</B> [<B>-ldug</B>] &quot;<I>everyone</I>&quot;|<I>user</I>|<I>group</I>[,...] <I>perm</I>|<I>@setname</I>[,...] 
     <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>allow</B> [<B>-ld</B>] <B>-e</B> <I>perm</I>|@<I>setname</I>[,...] <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>allow</B> <B>-c</B> <I>perm</I>|@<I>setname</I>[,...] <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>allow</B> <B>-s</B> @<I>setname</I> <I>perm</I>|@<I>setname</I>[,...] <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>unallow</B> [<B>-rldug</B>] &quot;<I>everyone</I>&quot;|<I>user</I>|<I>group</I>[,...] [<I>perm</I>|@<I>setname</I>[,... ]] 
     <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>unallow</B> [<B>-rld</B>] <B>-e</B> [<I>perm</I>|@<I>setname</I>[,... ]] <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>unallow</B> [<B>-r</B>] <B>-c</B> [<I>perm</I>|@<I>setname</I>[ ... ]] <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>unallow</B> [<B>-r</B>] <B>-s</B> @<I>setname</I> [<I>perm</I>|@<I>setname</I>[,... ]] <I>filesystem</I>|<I>volume</I>
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>hold</B> [<B>-r</B>] <I>tag</I> <I>snapshot</I>...
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>holds</B> [<B>-r</B>] <I>snapshot</I>...
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>release</B> [<B>-r</B>] <I>tag</I> <I>snapshot</I>...
</PRE>

<P>
<P>

<PRE>
<B>zfs</B> <B>diff</B> [<B>-FHt</B>] <I>snapshot</I> <I>snapshot|filesystem</I>

</PRE><A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

<P>

The <B>zfs</B> command configures <B>ZFS</B> datasets within a <B>ZFS</B> storage pool, as described in <B><A HREF="../man8/zpool.8.html">zpool</A></B>(8). A dataset is identified by a unique path within the <B>ZFS</B> namespace. For example:
<P>

<PRE>
pool/{filesystem,volume,snapshot}
</PRE>


<P>
<P>
<P>
<P>

where the maximum length of a dataset name is <B>MAXNAMELEN</B> (256 bytes).
<P>
<P>

A dataset can be one of the following:
<P>



<B></B><I>file system</I>

<P>
<DL COMPACT><DT><DD>
A <B>ZFS</B> dataset of type <B>filesystem</B> can be mounted within the standard system namespace and behaves like other file systems. While <B>ZFS</B> file systems are designed to be <B>POSIX</B> compliant, known issues exist that prevent compliance in some cases. Applications that depend on standards conformance might fail due to nonstandard behavior when checking file system free space.
</DL>

<P>
<P>



<B></B><I>volume</I>

<P>
<DL COMPACT><DT><DD>
A logical volume exported as a raw or block device. This type of dataset should only be used under special circumstances. File systems are typically used in most environments.
</DL>

<P>
<P>



<B></B><I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
A read-only version of a file system or volume at a given point in time. It is specified as <I>filesystem@name</A></I> or <I><A HREF="mailto:volume@name">volume@name</I>.
</DL>

<P>
<P>



<B></B><I>bookmark</I>

<P>
<DL COMPACT><DT><DD>
Much like a <I>snapshot</I>, but without the hold on on-disk data. It can be used as the source of a send (but not for a receive).
It is specified as <I>filesystem#name</I> or <I>volume#name</I>.
</DL>

<P>
<A NAME="lbAE">&nbsp;</A>
<H3>ZFS File System Hierarchy</H3>

<P>

A <B>ZFS</B> storage pool is a logical collection of devices that provide space for datasets. A storage pool is also the root of the <B>ZFS</B> file system hierarchy.
<P>
<P>

The root of the pool can be accessed as a file system, such as mounting and unmounting, taking snapshots, and setting properties. The physical storage characteristics, however, are managed by the <B><A HREF="../man8/zpool.8.html">zpool</A></B>(8) command.
<P>
<P>

See <B><A HREF="../man8/zpool.8.html">zpool</A></B>(8) for more information on creating and administering pools.
<A NAME="lbAF">&nbsp;</A>
<H3>Snapshots</H3>

<P>

A snapshot is a read-only copy of a file system or volume. Snapshots can be created extremely quickly, and initially consume no additional space within the pool. As data within the active dataset changes, the snapshot consumes more data than would otherwise be shared with the active dataset.
<P>
<P>

Snapshots can have arbitrary names. Snapshots of volumes can be cloned or rolled back.  Visibility is determined by the <B>snapdev</B> property of the parent volume.
<P>
<P>

File system snapshots can be accessed under the <B>.zfs/snapshot</B> directory in the root of the file system. Snapshots are automatically mounted on demand and may be unmounted at regular intervals. The visibility of the <B>.zfs</B> directory can be controlled by the <B>snapdir</B> property.
<A NAME="lbAG">&nbsp;</A>
<H3>Bookmarks</H3>

<P>

A bookmark is like a snapshot, a read-only copy of a file system or volume. Bookmarks can be created extremely quickly, compared to snapshots, and they consume no additional space within the pool.  Bookmarks can also have arbitrary names, much like snapshots.
<P>
<P>

Unlike snapshots, bookmarks can not be accessed through the filesystem in any way. From a storage standpoint a bookmark just provides a way to reference when a snapshot was created as a distinct object.  Bookmarks are initially tied to a snapshot, not the filesystem/volume, and they will survive if the snapshot itself is destroyed.  Since they are very light weight there's little incentive to destroy them.
<A NAME="lbAH">&nbsp;</A>
<H3>Clones</H3>

<P>

A clone is a writable volume or file system whose initial contents are the same as another dataset. As with snapshots, creating a clone is nearly instantaneous, and initially consumes no additional space.
<P>
<P>

Clones can only be created from a snapshot. When a snapshot is cloned, it creates an implicit dependency between the parent and child. Even though the clone is created somewhere else in the dataset hierarchy, the original snapshot cannot be destroyed as long as a clone exists. The <B>origin</B> property exposes this dependency, and the <B>destroy</B> command lists any such dependencies, if they exist.
<P>
<P>

The clone parent-child dependency relationship can be reversed by using the <B>promote</B> subcommand. This causes the &quot;origin&quot; file system to become a clone of the specified file system, which makes it possible to destroy the file system that the clone was created from.
<A NAME="lbAI">&nbsp;</A>
<H3>Mount Points</H3>

<P>

Creating a <B>ZFS</B> file system is a simple operation, so the number of file systems per system is likely to be numerous. To cope with this, <B>ZFS</B> automatically manages mounting and unmounting file systems without the need to edit the <B>/etc/fstab</B> file. All automatically managed file systems are mounted by <B>ZFS</B> at boot time.
<P>
<P>

By default, file systems are mounted under <B>/</B><I>path</I>, where <I>path</I> is the name of the file system in the <B>ZFS</B> namespace. Directories are created and destroyed as needed.
<P>
<P>

A file system can also have a mount point set in the <B>mountpoint</B> property. This directory is created as needed, and <B>ZFS</B> automatically mounts the file system when the <B>zfs mount -a</B> command is invoked (without editing <B>/etc/fstab</B>). The <B>mountpoint</B> property can be inherited, so if <B>pool/home</B> has a mount point of <B>/export/stuff</B>, then <B>pool/home/user</B> automatically inherits a mount point of <B>/export/stuff/user</B>.
<P>
<P>

A file system <B>mountpoint</B> property of <B>none</B> prevents the file system from being mounted.
<P>
<P>

If needed, <B>ZFS</B> file systems can also be managed with traditional tools (<B>mount</B>, <B>umount</B>, <B>/etc/fstab</B>). If a file system's mount point is set to <B>legacy</B>, <B>ZFS</B> makes no attempt to manage the file system, and the administrator is responsible for mounting and unmounting the file system.
<A NAME="lbAJ">&nbsp;</A>
<H3>Deduplication</H3>

<P>

Deduplication is the process for removing redundant data at the block-level, reducing the total amount of data stored. If a file system has the <B>dedup</B> property enabled, duplicate data blocks are removed synchronously.  The result is that only unique data is stored and common components are shared among files.
<P>
<B>WARNING: DO NOT ENABLE DEDUPLICATION UNLESS YOU NEED IT AND KNOW EXACTLY WHAT YOU ARE DOING!</B>
<P>
Deduplicating data is a very resource-intensive operation. It is generally recommended that you have <I>at least</I> 1.25 GB of RAM per 1 TB of storage when you enable deduplication. But calculating the exact requirenments is a somewhat complicated affair. Please see the <B>Oracle Dedup Guide</B> for more information..
<P>
Enabling deduplication on an improperly-designed system will result in extreme performance issues (extremely slow filesystem and snapshot deletions etc.) and can potentially lead to data loss (i.e. unimportable pool due to memory exhaustion) if your system is not built for this purpose. Deduplication affects the processing power (CPU), disks (and the controller) as well as primary (real) memory.
<P>
Before creating a pool with deduplication enabled, ensure that you have planned your hardware requirements appropriately and implemented appropriate recovery practices, such as regular backups.
<P>
Unless necessary, deduplication should NOT be enabled on a system. Instead, consider using <I>compression=lz4</I>, as a less resource-intensive alternative.
<A NAME="lbAK">&nbsp;</A>
<H3>Native Properties</H3>

<P>

Properties are divided into two types, native properties and user-defined (or &quot;user&quot;) properties. Native properties either export internal statistics or control <B>ZFS</B> behavior. In addition, native properties are either editable or read-only. User properties have no effect on <B>ZFS</B> behavior, but you can use them to annotate datasets in a way that is meaningful in your environment. For more information about user properties, see the &quot;User Properties&quot; section, below.
<P>
<P>

Every dataset has a set of properties that export statistics about the dataset as well as control various behaviors. Properties are inherited from the parent unless overridden by the child. Some properties apply only to certain types of datasets (file systems, volumes, or snapshots).
<P>
<P>

The values of numeric properties can be specified using human-readable suffixes (for example, <B>k</B>, <B>KB</B>, <B>M</B>, <B>Gb</B>, and so forth, up to <B>Z</B> for zettabyte). The following are all valid (and equal) specifications: 
<P>

<PRE>
1536M, 1.5g, 1.50GB
</PRE>


<P>
<P>
<P>
<P>

The values of non-numeric properties are case sensitive and must be lowercase, except for <B>mountpoint</B>, <B>sharenfs</B>, and <B>sharesmb</B>.
<P>
<P>

The following native properties consist of read-only statistics about the dataset. These properties can be neither set, nor inherited. Native properties apply to all dataset types unless otherwise noted.
<P>



<B>available</B>

<P>
<DL COMPACT><DT><DD>
The amount of space available to the dataset and all its children, assuming that there is no other activity in the pool. Because space is shared within a pool, availability can be limited by any number of factors, including physical pool size, quotas, reservations, or other datasets within the pool.
<P>
This property can also be referred to by its shortened column name, <B>avail</B>.
</DL>

<P>
<P>



<B>compressratio</B>

<P>
<DL COMPACT><DT><DD>
For non-snapshots, the compression ratio achieved for the <B>used</B> space of this dataset, expressed as a multiplier.  The <B>used</B> property includes descendant datasets, and, for clones, does not include the space shared with the origin snapshot.  For snapshots, the <B>compressratio</B> is the same as the <B>refcompressratio</B> property.  Compression can be turned on by running: <B>zfs set compression=on </B><I>dataset</I>. The default value is <B>off</B>.
</DL>

<P>
<P>



<B>creation</B>

<P>
<DL COMPACT><DT><DD>
The time this dataset was created.
</DL>

<P>
<P>



<B>clones</B>

<P>
<DL COMPACT><DT><DD>
For snapshots, this property is a comma-separated list of filesystems or
volumes which are clones of this snapshot.  The clones' <B>origin</B> property
is this snapshot.  If the <B>clones</B> property is not empty, then this
snapshot can not be destroyed (even with the <B>-r</B> or <B>-f</B> options).
</DL>

<P>
<P>


<B>defer_destroy</B>

<P>
<DL COMPACT><DT><DD>
This property is <B>on</B> if the snapshot has been marked for deferred destruction by using the <B>zfs destroy</B> <B>-d</B> command. Otherwise, the property is <B>off</B>.
</DL>

<P>
<P>



<B>filesystem_count</B>

<P>
<DL COMPACT><DT><DD>
The total number of filesystems and volumes that exist under this location in the
dataset tree.  This value is only available when a <B>filesystem_limit</B> has
been set somewhere in the tree under which the dataset resides.
</DL>

<P>
<P>


<B>logicalreferenced</B>

<P>
<DL COMPACT><DT><DD>
The amount of space that is &quot;logically&quot; accessible by this dataset.  See
the <B>referenced</B> property.  The logical space ignores the effect of
the <B>compression</B> and <B>copies</B> properties, giving a quantity
closer to the amount of data that applications see.  However, it does
include space consumed by metadata.
<P>
This property can also be referred to by its shortened column name,
<B>lrefer</B>.
</DL>

<P>
<P>


<B>logicalused</B>

<P>
<DL COMPACT><DT><DD>
The amount of space that is &quot;logically&quot; consumed by this dataset and all
its descendents.  See the <B>used</B> property.  The logical space
ignores the effect of the <B>compression</B> and <B>copies</B> properties,
giving a quantity closer to the amount of data that applications see.
However, it does include space consumed by metadata.
<P>
This property can also be referred to by its shortened column name,
<B>lused</B>.
</DL>

<P>
<P>


<B>mounted</B>

<P>
<DL COMPACT><DT><DD>
For file systems, indicates whether the file system is currently mounted. This property can be either <B>yes</B> or <B>no</B>.
</DL>

<P>
<P>



<B>origin</B>

<P>
<DL COMPACT><DT><DD>
For cloned file systems or volumes, the snapshot from which the clone was created. See also the <B>clones</B> property.
</DL>

<P>
<P>



<B>referenced</B>

<P>
<DL COMPACT><DT><DD>
The amount of data that is accessible by this dataset, which may or may not be shared with other datasets in the pool. When a snapshot or clone is created, it initially references the same amount of space as the file system or snapshot it was created from, since its contents are identical.
<P>
This property can also be referred to by its shortened column name, <B>refer</B>.
</DL>

<P>
<P>



<B>refcompressratio</B>

<P>
<DL COMPACT><DT><DD>
The compression ratio achieved for the <B>referenced</B> space of this
dataset, expressed as a multiplier.  See also the <B>compressratio</B>
property.
</DL>

<P>
<P>



<B>snapshot_count</B>

<P>
<DL COMPACT><DT><DD>
The total number of snapshots that exist under this location in the dataset tree.
This value is only available when a <B>snapshot_limit</B> has been set somewhere
in the tree under which the dataset resides.
</DL>

<P>
<P>


<B>type</B>

<P>
<DL COMPACT><DT><DD>
The type of dataset: <B>filesystem</B>, <B>volume</B>, or <B>snapshot</B>.
</DL>

<P>
<P>



<B>used</B>

<P>
<DL COMPACT><DT><DD>
The amount of space consumed by this dataset and all its descendents. This is the value that is checked against this dataset's quota and reservation. The space used does not include this dataset's reservation, but does take into account the reservations of any descendent datasets. The amount of space that a dataset consumes from its parent, as well as the amount of space that are freed if this dataset is recursively destroyed, is the greater of its space used and its reservation.
<P>
When snapshots (see the &quot;Snapshots&quot; section) are created, their space is initially shared between the snapshot and the file system, and possibly with previous snapshots. As the file system changes, space that was previously shared becomes unique to the snapshot, and counted in the snapshot's space used. Additionally, deleting snapshots can increase the amount of space unique to (and used by) other snapshots.
<P>
The amount of space used, available, or referenced does not take into account pending changes. Pending changes are generally accounted for within a few seconds. Committing a change to a disk using <B><A HREF="../man2/fsync.2.html">fsync</A></B>(2) or <B>O_SYNC</B> does not necessarily guarantee that the space usage information is updated immediately.
</DL>

<P>
<P>



<B>usedby*</B>

<P>
<DL COMPACT><DT><DD>
The <B>usedby*</B> properties decompose the <B>used</B> properties into the various reasons that space is used. Specifically, <B>used</B> = <B>usedbychildren</B> + <B>usedbydataset</B> + <B>usedbyrefreservation</B> +, <B>usedbysnapshots</B>. These properties are only available for datasets created on <B>zpool</B> &quot;version 13&quot; pools.
</DL>

<P>
<P>



<B>usedbychildren</B>

<P>
<DL COMPACT><DT><DD>
The amount of space used by children of this dataset, which would be freed if all the dataset's children were destroyed.
</DL>

<P>
<P>



<B>usedbydataset</B>

<P>
<DL COMPACT><DT><DD>
The amount of space used by this dataset itself, which would be freed if the dataset were destroyed (after first removing any <B>refreservation</B> and destroying any necessary snapshots or descendents).
</DL>

<P>
<P>



<B>usedbyrefreservation</B>

<P>
<DL COMPACT><DT><DD>
The amount of space used by a <B>refreservation</B> set on this dataset, which would be freed if the <B>refreservation</B> was removed.
</DL>

<P>
<P>



<B>usedbysnapshots</B>

<P>
<DL COMPACT><DT><DD>
The amount of space consumed by snapshots of this dataset. In particular, it is the amount of space that would be freed if all of this dataset's snapshots were destroyed. Note that this is not simply the sum of the snapshots' <B>used</B> properties because space can be shared by multiple snapshots.
</DL>

<P>
<P>



<B>userused@</B><I>user</I>

<P>
<DL COMPACT><DT><DD>
The amount of space consumed by the specified user in this dataset. Space is charged to the owner of each file, as displayed by <B>ls</B> <B>-l</B>. The amount of space charged is displayed by <B>du</B> and <B>ls</B> <B>-s</B>. See the <B>zfs userspace</B> subcommand for more information.
<P>
Unprivileged users can access only their own space usage. The root user, or a user who has been granted the <B>userused</B> privilege with <B>zfs allow</B>, can access everyone's usage.
<P>
The <B>userused@</B>... properties are not displayed by <B>zfs get all</B>. The user's name must be appended after the <B>@</B> symbol, using one of the following forms:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
<I>POSIX name</I> (for example, <B>joe</B>)
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
<I>POSIX numeric ID</I> (for example, <B>789</B>)
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
<I>SID name</I> (for example, <B>joe.smith@mydomain</B>)
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
<I>SID numeric ID</I> (for example, <B>S-1-123-456-789</B>)
</DL>
</DL>

</DL>

<P>
<P>



<B>userrefs</B>

<P>
<DL COMPACT><DT><DD>
This property is set to the number of user holds on this snapshot. User holds are set by using the <B>zfs hold</B> command.
</DL>

<P>
<P>



<B>groupused@</B><I>group</I>

<P>
<DL COMPACT><DT><DD>
The amount of space consumed by the specified group in this dataset. Space is charged to the group of each file, as displayed by <B>ls</B> <B>-l</B>. See the <B>userused@</B><I>user</I> property for more information.
<P>
Unprivileged users can only access their own groups' space usage. The root user, or a user who has been granted the <B>groupused</B> privilege with <B>zfs allow</B>, can access all groups' usage.
</DL>

<P>
<P>



<B>volblocksize</B>=<I>blocksize</I>

<P>
<DL COMPACT><DT><DD>
For volumes, specifies the block size of the volume. The <B>blocksize</B> cannot be changed once the volume has been written, so it should be set at volume creation time. The default <B>blocksize</B> for volumes is 8 Kbytes. Any power of 2 from 512 bytes to 128 Kbytes is valid.
<P>
This property can also be referred to by its shortened column name, <B>volblock</B>.
</DL>

<P>
<P>


<B>written</B>

<P>
<DL COMPACT><DT><DD>
The amount of <B>referenced</B> space written to this dataset since the
previous snapshot.
</DL>

<P>
<P>


<B>written@</B><I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
The amount of <B>referenced</B> space written to this dataset since the
specified snapshot.  This is the space that is referenced by this dataset
but was not referenced by the specified snapshot.
<P>
The <I>snapshot</I> may be specified as a short snapshot name (just the part
after the <B>@</B>), in which case it will be interpreted as a snapshot in
the same filesystem as this dataset.
The <I>snapshot</I> be a full snapshot name (<I>filesystem</I>@<I>snapshot</I>),
which for clones may be a snapshot in the origin's filesystem (or the origin
of the origin's filesystem, etc).
</DL>

<P>
<P>
<P>

The following native properties can be used to change the behavior of a <B>ZFS</B> dataset.
<P>



<B>aclinherit</B>=<B>discard</B> | <B>noallow</B> | <B>restricted</B> | <B>passthrough</B> | <B>passthrough-x</B>

<P>
<DL COMPACT><DT><DD>
Controls how <B>ACL</B> entries are inherited when files and directories are created. A file system with an <B>aclinherit</B> property of <B>discard</B> does not inherit any <B>ACL</B> entries. A file system with an <B>aclinherit</B> property value of <B>noallow</B> only inherits inheritable <B>ACL</B> entries that specify &quot;deny&quot; permissions. The property value <B>restricted</B> (the default) removes the <B>write_acl</B> and <B>write_owner</B> permissions when the <B>ACL</B> entry is inherited. A file system with an <B>aclinherit</B> property value of <B>passthrough</B> inherits all inheritable <B>ACL</B> entries without any modifications made to the <B>ACL</B> entries when they are inherited. A file system with an <B>aclinherit</B> property value of <B>passthrough-x</B> has the same meaning as <B>passthrough</B>, except that the <B>owner@</B>, <B>group@</B>, and <B>everyone@</B> <B>ACE</B>s inherit the execute permission only if the file creation mode also requests the execute bit.
<P>
When the property value is set to <B>passthrough</B>, files are created with a mode determined by the inheritable <B>ACE</B>s. If no inheritable <B>ACE</B>s exist that affect the mode, then the mode is set in accordance to the requested mode from the application.
<P>
The <B>aclinherit</B> property does not apply to Posix ACLs.
</DL>

<P>
<P>



<B>acltype</B>=<B>noacl</B> | <B>posixacl</B> 

<P>
<DL COMPACT><DT><DD>
Controls whether ACLs are enabled and if so what type of ACL to use.  When
a file system has the <B>acltype</B> property set to <B>noacl</B> (the default)
then ACLs are disabled.  Setting the <B>acltype</B> property to <B>posixacl</B>
indicates Posix ACLs should be used.  Posix ACLs are specific to Linux and
are not functional on other platforms.  Posix ACLs are stored as an xattr and
therefore will not overwrite any existing ZFS/NFSv4 ACLs which may be set.
Currently only <B>posixacls</B> are supported on Linux.
<P>
To obtain the best performance when setting <B>posixacl</B> users are strongly
encouraged to set the <B>xattr=sa</B> property.  This will result in the
Posix ACL being stored more efficiently on disk.  But as a consequence of this
all new xattrs will only be accessible from ZFS implementations which support
the <B>xattr=sa</B> property.  See the <B>xattr</B> property for more details.
</DL>

<P>
<P>



<B>atime</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether the access time for files is updated when they are read. Turning this property off avoids producing write traffic when reading files and can result in significant performance gains, though it might confuse mailers and other similar utilities. The default value is <B>on</B>.  See also <B>relatime</B> below.
</DL>

<P>
<P>



<B>canmount</B>=<B>on</B> | <B>off</B> | <B>noauto</B>

<P>
<DL COMPACT><DT><DD>
If this property is set to <B>off</B>, the file system cannot be mounted, and is ignored by <B>zfs mount -a</B>. Setting this property to <B>off</B> is similar to setting the <B>mountpoint</B> property to <B>none</B>, except that the dataset still has a normal <B>mountpoint</B> property, which can be inherited. Setting this property to <B>off</B> allows datasets to be used solely as a mechanism to inherit properties. One example of setting <B>canmount=</B><B>off</B> is to have two datasets with the same <B>mountpoint</B>, so that the children of both datasets appear in the same directory, but might have different inherited characteristics.
<P>
When the <B>noauto</B> option is set, a dataset can only be mounted and unmounted explicitly. The dataset is not mounted automatically when the dataset is created or imported, nor is it mounted by the <B>zfs mount -a</B> command or unmounted by the <B>zfs unmount -a</B> command.
<P>
This property is not inherited.
</DL>

<P>
<P>



<B>checksum</B>=<B>on</B> | <B>off</B> | <B>fletcher2,</B>| <B>fletcher4</B> | <B>sha256</B>

<P>
<DL COMPACT><DT><DD>
Controls the checksum used to verify data integrity. The default value is <B>on</B>, which automatically selects an appropriate algorithm (currently, <B>fletcher4</B>, but this may change in future releases). The value <B>off</B> disables integrity checking on user data. Disabling checksums is <B>NOT</B> a recommended practice.
<P>
Changing this property affects only newly-written data.
</DL>

<P>
<P>



<B>compression</B>=<B>on</B> | <B>off</B> | <B>lzjb</B> | <B>lz4</B> |
<B>gzip</B> | <B>gzip-</B><I>N</I> | <B>zle</B>

<P>
<DL COMPACT><DT><DD>
Controls the compression algorithm used for this dataset.
<P>
Setting compression to <B>on</B> indicates that the current default
compression algorithm should be used.  The default balances compression
and decompression speed, with compression ratio and is expected to
work well on a wide variety of workloads.  Unlike all other settings for
this property, <B>on</B> does not select a fixed compression type.  As
new compression algorithms are added to ZFS and enabled on a pool, the
default compression algorithm may change.  The current default compression
algorthm is either <B>lzjb</B> or, if the <B>lz4_compress</B> feature is
enabled, <B>lz4</B>.
<P>
The <B>lzjb</B> compression algorithm is optimized for performance while
providing decent data compression.
<P>
The <B>lz4</B> compression algorithm is a high-performance replacement
for the <B>lzjb</B> algorithm. It features significantly faster
compression and decompression, as well as a moderately higher
compression ratio than <B>lzjb</B>, but can only be used on pools with
the <B>lz4_compress</B> feature set to <I>enabled</I>. See
<B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for details on ZFS feature flags and the
<B>lz4_compress</B> feature.
<P>
The <B>gzip</B> compression algorithm uses the same compression as
the <B><A HREF="../man1/gzip.1.html">gzip</A></B>(1) command. You can specify the <B>gzip</B> level by using the
value <B>gzip-</B><I>N</I> where <I>N</I> is an integer from 1 (fastest) to 9
(best compression ratio). Currently, <B>gzip</B> is equivalent to <B>gzip-6</B>
(which is also the default for <B><A HREF="../man1/gzip.1.html">gzip</A></B>(1)). The <B>zle</B> compression
algorithm compresses runs of zeros.
<P>
This property can also be referred to by its shortened column name
<B>compress</B>. Changing this property affects only newly-written data.
</DL>

<P>
<P>



<B>copies</B>=<B>1</B> | <B>2</B> | <B>3</B>

<P>
<DL COMPACT><DT><DD>
Controls the number of copies of data stored for this dataset. These copies are in addition to any redundancy provided by the pool, for example, mirroring or RAID-Z. The copies are stored on different disks, if possible. The space used by multiple copies is charged to the associated file and dataset, changing the <B>used</B> property and counting against quotas and reservations.
<P>
Changing this property only affects newly-written data. Therefore, set this property at file system creation time by using the <B>-o</B> <B>copies=</B><I>N</I> option.
</DL>

<P>
<P>



<B>dedup</B>=<B>on</B> | <B>off</B> | <B>verify</B> | <B>sha256</B>[,<B>verify</B>]

<P>
<DL COMPACT><DT><DD>
Controls whether deduplication is in effect for a dataset. The default value is <B>off</B>. The default checksum used for deduplication is <B>sha256</B> (subject to change). When <B>dedup</B> is enabled, the <B>dedup</B> checksum algorithm overrides the <B>checksum</B> property. Setting the value to <B>verify</B> is equivalent to specifying <B>sha256,verify</B>.
<P>
If the property is set to <B>verify</B>, then, whenever two blocks have the same signature, ZFS will do a byte-for-byte comparison with the existing block to ensure that the contents are identical.
<P>
Unless necessary, deduplication should NOT be enabled on a system. See <B>Deduplication</B> above.
</DL>

<P>
<P>



<B>devices</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether device nodes can be opened on this file system. The default value is <B>on</B>.
</DL>

<P>
<P>



<B>exec</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether processes can be executed from within this file system. The default value is <B>on</B>.
</DL>

<P>
<P>



<B>mlslabel</B>=<I>label</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
The <B>mlslabel</B> property is a sensitivity label that determines if a dataset  can be mounted in a zone on a system with Trusted Extensions enabled. If the labeled dataset matches the labeled zone, the dataset can be mounted  and accessed from the labeled zone.
<P>
When the <B>mlslabel</B> property is not set, the default value is <B>none</B>. Setting the  <B>mlslabel</B> property to <B>none</B> is equivalent to removing the property.
<P>
The <B>mlslabel</B> property can be modified only when Trusted Extensions is enabled and only with appropriate privilege. Rights to modify it cannot be delegated. When changing a label to a higher label or setting the initial dataset label, the <B>{PRIV_FILE_UPGRADE_SL}</B> privilege is required. When changing a label to a lower label or the default (<B>none</B>), the <B>{PRIV_FILE_DOWNGRADE_SL}</B> privilege is required. Changing the dataset to labels other than the default can be done only when the dataset is not mounted. When a dataset with the default label is mounted into a labeled-zone, the mount operation automatically sets the <B>mlslabel</B> property to the label of that zone.
<P>
When Trusted Extensions is <B>not</B> enabled, only datasets with the default label (<B>none</B>) can be mounted.
<P>
Zones are a Solaris feature and are not relevant on Linux.
</DL>

<P>
<P>



<B>filesystem_limit</B>=<I>count</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
Limits the number of filesystems and volumes that can exist under this point in
the dataset tree.  The limit is not enforced if the user is allowed to change
the limit. Setting a filesystem_limit on a descendent of a filesystem that
already has a filesystem_limit does not override the ancestor's filesystem_limit,
but rather imposes an additional limit. This feature must be enabled to be used
(see <B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5)).
</DL>

<P>
<P>


<B>mountpoint</B>=<I>path</I> | <B>none</B> | <B>legacy</B>

<P>
<DL COMPACT><DT><DD>
Controls the mount point used for this file system. See the &quot;Mount Points&quot; section for more information on how this property is used. 
<P>
When the <B>mountpoint</B> property is changed for a file system, the file system and any children that inherit the mount point are unmounted. If the new value is <B>legacy</B>, then they remain unmounted. Otherwise, they are automatically remounted in the new location if the property was previously <B>legacy</B> or <B>none</B>, or if they were mounted before the property was changed. In addition, any shared file systems are unshared and shared in the new location.
</DL>

<P>
<P>



<B>nbmand</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether the file system should be mounted with <B>nbmand</B> (Non Blocking mandatory locks). This is used for <B>CIFS</B> clients. Changes to this property only take effect when the file system is umounted and remounted. See <B><A HREF="../man8/mount.8.html">mount</A></B>(8) for more information on <B>nbmand</B> mounts.
</DL>

<P>
<P>



<B>primarycache</B>=<B>all</B> | <B>none</B> | <B>metadata</B>

<P>
<DL COMPACT><DT><DD>
Controls what is cached in the primary cache (ARC). If this property is set to <B>all</B>, then both user data and metadata is cached. If this property is set to <B>none</B>, then neither user data nor metadata is cached. If this property is set to <B>metadata</B>, then only metadata is cached. The default value is <B>all</B>.
</DL>

<P>
<P>



<B>quota</B>=<I>size</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
Limits the amount of space a dataset and its descendents can consume. This property enforces a hard limit on the amount of space used. This includes all space consumed by descendents, including file systems and snapshots. Setting a quota on a descendent of a dataset that already has a quota does not override the ancestor's quota, but rather imposes an additional limit.
<P>
Quotas cannot be set on volumes, as the <B>volsize</B> property acts as an implicit quota.
</DL>

<P>
<P>



<B>snapshot_limit</B>=<I>count</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
Limits the number of snapshots that can be created on a dataset and its
descendents. Setting a snapshot_limit on a descendent of a dataset that already
has a snapshot_limit does not override the ancestor's snapshot_limit, but
rather imposes an additional limit. The limit is not enforced if the user is
allowed to change the limit. For example, this means that recursive snapshots
taken from the global zone are counted against each delegated dataset within
a zone. This feature must be enabled to be used (see <B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5)).
</DL>

<P>
<P>


<B>userquota@</B><I>user</I>=<I>size</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
Limits the amount of space consumed by the specified user. Similar to the <B>refquota</B> property, the <B>userquota</B> space calculation does not include space that is used by descendent datasets, such as snapshots and clones. User space consumption is identified by the <B>userspace@</B><I>user</I> property.
<P>
Enforcement of user quotas may be delayed by several seconds. This delay means that a user might exceed their quota before the system notices that they are over quota and begins to refuse additional writes with the <B>EDQUOT</B> error message . See the <B>zfs userspace</B> subcommand for more information.
<P>
Unprivileged users can only access their own groups' space usage. The root user, or a user who has been granted the <B>userquota</B> privilege with <B>zfs allow</B>, can get and set everyone's quota.
<P>
This property is not available on volumes, on file systems before version 4, or on pools before version 15. The <B>userquota@</B>... properties are not displayed by <B>zfs get all</B>. The user's name must be appended after the <B>@</B> symbol, using one of the following forms:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
<I>POSIX name</I> (for example, <B>joe</B>)
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
<I>POSIX numeric ID</I> (for example, <B>789</B>)
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
<I>SID name</I> (for example, <B>joe.smith@mydomain</B>)
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
<I>SID numeric ID</I> (for example, <B>S-1-123-456-789</B>)
</DL>
</DL>

</DL>

<P>
<P>



<B>groupquota@</B><I>group</I>=<I>size</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
Limits the amount of space consumed by the specified group. Group space consumption is identified by the <B>userquota@</B><I>user</I> property.
<P>
Unprivileged users can access only their own groups' space usage. The root user, or a user who has been granted the <B>groupquota</B> privilege with <B>zfs allow</B>, can get and set all groups' quotas.
</DL>

<P>
<P>



<B>readonly</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether this dataset can be modified. The default value is <B>off</B>.
<P>
This property can also be referred to by its shortened column name, <B>rdonly</B>.
</DL>

<P>
<P>



<B>recordsize</B>=<I>size</I>

<P>
<DL COMPACT><DT><DD>
Specifies a suggested block size for files in the file system. This property is designed solely for use with database workloads that access files in fixed-size records. <B>ZFS</B> automatically tunes block sizes according to internal algorithms optimized for typical access patterns. 
<P>
For databases that create very large files but access them in small random chunks, these algorithms may be suboptimal. Specifying a <B>recordsize</B> greater than or equal to the record size of the database can result in significant performance gains. Use of this property for general purpose file systems is strongly discouraged, and may adversely affect performance.
<P>
The size specified must be a power of two greater than or equal to 512 and less than or equal to 128 Kbytes.
<P>
Changing the file system's <B>recordsize</B> affects only files created afterward; existing files are unaffected.
<P>
This property can also be referred to by its shortened column name, <B>recsize</B>.
</DL>

<P>
<P>



<B>redundant_metadata</B>=<B>all</B> | <B>most</B>

<P>
<DL COMPACT><DT><DD>
Controls what types of metadata are stored redundantly.  ZFS stores an
extra copy of metadata, so that if a single block is corrupted, the
amount of user data lost is limited.  This extra copy is in addition to
any redundancy provided at the pool level (e.g. by mirroring or RAID-Z),
and is in addition to an extra copy specified by the <B>copies</B>
property (up to a total of 3 copies).  For example if the pool is
mirrored, <B>copies</B>=2, and <B>redundant_metadata</B>=most, then ZFS
stores 6 copies of most metadata, and 4 copies of data and some
metadata.
<P>
When set to <B>all</B>, ZFS stores an extra copy of all metadata.  If a
single on-disk block is corrupt, at worst a single block of user data
(which is <B>recordsize</B> bytes long) can be lost.
<P>
When set to <B>most</B>, ZFS stores an extra copy of most types of
metadata.  This can improve performance of random writes, because less
metadata must be written.  In practice, at worst about 100 blocks (of
<B>recordsize</B> bytes each) of user data can be lost if a single
on-disk block is corrupt.  The exact behavior of which metadata blocks
are stored redundantly may change in future releases.
<P>
The default value is <B>all</B>.
</DL>

<P>
<P>


<B>refquota</B>=<I>size</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
Limits the amount of space a dataset can consume. This property enforces a hard limit on the amount of space used. This hard limit does not include space used by descendents, including file systems and snapshots.
</DL>

<P>
<P>



<B>refreservation</B>=<I>size</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
The minimum amount of space guaranteed to a dataset, not including its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by <B>refreservation</B>. The <B>refreservation</B> reservation is accounted for in the parent datasets' space used, and counts against the parent datasets' quotas and reservations.
<P>
If <B>refreservation</B> is set, a snapshot is only allowed if there is enough free pool space outside of this reservation to accommodate the current number of &quot;referenced&quot; bytes in the dataset.
<P>
This property can also be referred to by its shortened column name, <B>refreserv</B>.
</DL>

<P>
<P>



<B>relatime</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls the manner in which the access time is updated when <B>atime=on</B> is set.  Turning this property <B>on</B> causes the access time to be updated relative to the modify or change time.  Access time is only updated if the previous access time was earlier than the current modify or change time or if the existing access time hasn't been updated within the past 24 hours.  The default value is <B>off</B>.
</DL>

<P>
<P>



<B>reservation</B>=<I>size</I> | <B>none</B>

<P>
<DL COMPACT><DT><DD>
The minimum amount of space guaranteed to a dataset and its descendents. When the amount of space used is below this value, the dataset is treated as if it were taking up the amount of space specified by its reservation. Reservations are accounted for in the parent datasets' space used, and count against the parent datasets' quotas and reservations.
<P>
This property can also be referred to by its shortened column name, <B>reserv</B>.
</DL>

<P>
<P>



<B>secondarycache</B>=<B>all</B> | <B>none</B> | <B>metadata</B>

<P>
<DL COMPACT><DT><DD>
Controls what is cached in the secondary cache (L2ARC). If this property is set to <B>all</B>, then both user data and metadata is cached. If this property is set to <B>none</B>, then neither user data nor metadata is cached. If this property is set to <B>metadata</B>, then only metadata is cached. The default value is <B>all</B>.
</DL>

<P>
<P>



<B>setuid</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether the set-<B>UID</B> bit is respected for the file system. The default value is <B>on</B>.
</DL>

<P>
<P>



<B>shareiscsi</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Like the <B>sharenfs</B> property, <B>shareiscsi</B> indicates whether a <B>ZFS</B> volume is exported as an <B>iSCSI</B> target. The acceptable values for this property are <B>on</B>, <B>off</B>, and <B>type=disk</B>. The default value is <B>off</B>. In the future, other target types might be supported. For example, <B>tape</B>.
<P>
You might want to set <B>shareiscsi=on</B> for a file system so that all <B>ZFS</B> volumes within the file system are shared by default. However, setting this property on a file system has no direct effect.
</DL>

<P>
<P>



<B>sharesmb</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether the file system is shared by using <B>Samba USERSHARES</B>, and what options are to be used. Otherwise, the file system is automatically shared and unshared with the <B>zfs share</B> and <B>zfs unshare</B> commands. If the property is set to <B>on</B>, the <B><A HREF="../man8/net.8.html">net</A></B>(8) command is invoked to create a <B>USERSHARE</B>.
<P>
Because <B>SMB</B> shares requires a resource name, a unique resource name is constructed from the dataset name. The constructed name is a copy of the dataset name except that the characters in the dataset name, which would be illegal in the resource name, are replaced with underscore (<B>_</B>) characters. The ZFS On Linux driver does not (yet) support additional options which might be available in the Solaris version.
<P>
If the <B>sharesmb</B> property is set to <B>off</B>, the file systems are unshared.
<P>
In Linux, the share is created with the ACL (Access Control List) &quot;Everyone:F&quot; (&quot;F&quot; stands for &quot;full permissions&quot;, ie. read and write permissions) and no guest access (which means samba must be able to authenticate a real user, system passwd/shadow, ldap or smbpasswd based) by default. This means that any additional access control (dissalow specific user specific access etc) must be done on the underlaying filesystem.
<P>

Example to mount a SMB filesystem shared through ZFS (share/tmp):

Note that a user and his/her password <B>must</B> be given!
<P>

smbmount //127.0.0.1/share_tmp /mnt/tmp -o user=workgroup/turbo,password=obrut,uid=1000


<P>



<B>Minimal /etc/samba/smb.conf configuration</B>
<P>

* Samba will need to listen to 'localhost' (127.0.0.1) for the zfs utilities to communitate with samba.  This is the default behavior for most Linux distributions.
<P>
* Samba must be able to authenticate a user. This can be done in a number of ways, depending on if using the system password file, LDAP or the Samba specific smbpasswd file. How to do this is outside the scope of this manual. Please refer to the <A HREF="../man5/smb.conf.5.html">smb.conf</A>(5) manpage for more information.
<P>
* See the <B>USERSHARE</B> section of the <B><A HREF="../man5/smb.conf.5.html">smb.conf</A></B>(5) man page for all configuration options in case you need to modify any options to the share afterwards. Do note that any changes done with the 'net' command will be undone if the share is every unshared (such as at a reboot etc). In the future, ZoL will be able to set specific options directly using sharesmb=&lt;option&gt;.
<P>

</DL>

<P>
<P>



<B>sharenfs</B>=<B>on</B> | <B>off</B> | <I>opts</I>

<P>
<DL COMPACT><DT><DD>
Controls whether the file system is shared via <B>NFS</B>, and what options are used. A file system with a <B>sharenfs</B> property of <B>off</B> is managed with the <B><A HREF="../man8/exportfs.8.html">exportfs</A></B>(8) command and entries in <B>/etc/exports</B> file. Otherwise, the file system is automatically shared and unshared with the <B>zfs share</B> and <B>zfs unshare</B> commands. If the property is set to <B>on</B>, the dataset is shared using the <B><A HREF="../man8/exportfs.8.html">exportfs</A></B>(8) command in the following manner (see <B><A HREF="../man8/exportfs.8.html">exportfs</A></B>(8) for the meaning of the different options):
<P>

<PRE>
/usr/sbin/exportfs -i -o sec=sys,rw,no_subtree_check,no_root_squash,mountpoint *:&lt;mountpoint of dataset&gt;
</PRE>


<P>
Otherwise, the <B><A HREF="../man8/exportfs.8.html">exportfs</A></B>(8) command is invoked with options equivalent to the contents of this property.
<P>
When the <B>sharenfs</B> property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously <B>off</B>, or if they were shared before the property was changed. If the new property is <B>off</B>, the file systems are unshared.
</DL>

<P>
<P>



<B>logbias</B> = <B>latency</B> | <B>throughput</B>

<P>
<DL COMPACT><DT><DD>
Provide a hint to ZFS about handling of synchronous requests in this dataset. If <B>logbias</B> is set to <B>latency</B> (the default), ZFS will use pool log devices (if configured) to handle the requests at low latency. If <B>logbias</B> is set to <B>throughput</B>, ZFS will not use configured pool log devices. ZFS will instead optimize synchronous operations for global pool throughput and efficient use of resources.
</DL>

<P>
<P>



<B>snapdev</B>=<B>hidden</B> | <B>visible</B>

<P>
<DL COMPACT><DT><DD>
Controls whether the snapshots devices of zvol's are hidden or visible. The default value is <B>hidden</B>.
</DL>

<P>
<P>



<B>snapdir</B>=<B>hidden</B> | <B>visible</B>

<P>
<DL COMPACT><DT><DD>
Controls whether the <B>.zfs</B> directory is hidden or visible in the root of the file system as discussed in the &quot;Snapshots&quot; section. The default value is <B>hidden</B>.
</DL>

<P>
<P>



<B>sync</B>=<B>standard</B> | <B>always</B> | <B>disabled</B>

<P>
<DL COMPACT><DT><DD>
Controls the behavior of synchronous requests (e.g. fsync, O_DSYNC).
<B>standard</B> is the POSIX specified behavior of ensuring all synchronous
requests are written to stable storage and all devices are flushed to ensure
data is not cached by device controllers (this is the default). <B>always</B>
causes every file system transaction to be written and flushed before its
system call returns. This has a large performance penalty. <B>disabled</B>
disables synchronous requests. File system transactions are only committed to
stable storage periodically. This option will give the highest performance.
However, it is very dangerous as ZFS would be ignoring the synchronous
transaction demands of applications such as databases or NFS.  Administrators
should only use this option when the risks are understood.
</DL>

<P>
<P>


<B>version</B>=<B>1</B> | <B>2</B> | <B>current</B>

<P>
<DL COMPACT><DT><DD>
The on-disk version of this file system, which is independent of the pool version. This property can only be set to later supported versions. See the <B>zfs upgrade</B> command.
</DL>

<P>
<P>



<B>volsize</B>=<I>size</I>

<P>
<DL COMPACT><DT><DD>
For volumes, specifies the logical size of the volume. By default, creating a volume establishes a reservation of equal size. For storage pools with a version number of 9 or higher, a <B>refreservation</B> is set instead. Any changes to <B>volsize</B> are reflected in an equivalent change to the reservation (or <B>refreservation</B>). The <B>volsize</B> can only be set to a multiple of <B>volblocksize</B>, and cannot be zero.
<P>
The reservation is kept equal to the volume's logical size to prevent unexpected behavior for consumers. Without the reservation, the volume could run out of space, resulting in undefined behavior or data corruption, depending on how the volume is used. These effects can also occur when the volume size is changed while it is in use (particularly when shrinking the size). Extreme care should be used when adjusting the volume size.
<P>
Though not recommended, a &quot;sparse volume&quot; (also known as &quot;thin provisioning&quot;) can be created by specifying the <B>-s</B> option to the <B>zfs create -V</B> command, or by changing the reservation after the volume has been created. A &quot;sparse volume&quot; is a volume where the reservation is less then the volume size. Consequently, writes to a sparse volume can fail with <B>ENOSPC</B> when the pool is low on space. For a sparse volume, changes to <B>volsize</B> are not reflected in the reservation.
</DL>

<P>
<P>



<B>vscan</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether regular files should be scanned for viruses when a file is opened and closed. In addition to enabling this property, the virus scan service must also be enabled for virus scanning to occur. The default value is <B>off</B>.
</DL>

<P>
<P>



<B>xattr</B>=<B>on</B> | <B>off</B> | <B>sa</B>

<P>
<DL COMPACT><DT><DD>
Controls whether extended attributes are enabled for this file system.  Two
styles of extended attributes are supported either directory based or system
attribute based.
<P>
The default value of <B>on</B> enables directory based extended attributes.
This style of xattr imposes no practical limit on either the size or number of
xattrs which may be set on a file.  Although under Linux the <B><A HREF="../man2/getxattr.2.html">getxattr</A></B>(2)
and <B><A HREF="../man2/setxattr.2.html">setxattr</A></B>(2) system calls limit the maximum xattr size to 64K.  This
is the most compatible style of xattr and it is supported by the majority of
ZFS implementations.
<P>
System attribute based xattrs may be enabled by setting the value to <B>sa</B>.
The key advantage of this type of xattr is improved performance.  Storing
xattrs as system attributes significantly decreases the amount of disk IO
required.  Up to 64K of xattr data may be stored per file in the space reserved
for system attributes.  If there is not enough space available for an xattr then
it will be automatically written as a directory based xattr.  System attribute
based xattrs are not accessible on platforms which do not support the
<B>xattr=sa</B> feature.
<P>
The use of system attribute based xattrs is strongly encouraged for users of
SELinux or Posix ACLs.  Both of these features heavily rely of xattrs and
benefit significantly from the reduced xattr access time.
</DL>

<P>
<P>



<B>zoned</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Controls whether the dataset is managed from a non-global zone. Zones are a Solaris feature and are not relevant on Linux. The default value is <B>off</B>.
</DL>

<P>
<P>
<P>

The following three properties cannot be changed after the file system is created, and therefore, should be set when the file system is created. If the properties are not set with the <B>zfs create</B> or <B>zpool create</B> commands, these properties are inherited from the parent dataset. If the parent dataset lacks these properties due to having been created prior to these features being supported, the new file system will have the default values for these properties.
<P>



<B>casesensitivity</B>=<B>sensitive</B> | <B>insensitive</B> | <B>mixed</B>

<P>
<DL COMPACT><DT><DD>
Indicates whether the file name matching algorithm used by the file system should be case-sensitive, case-insensitive, or allow a combination of both styles of matching. The default value for the <B>casesensitivity</B> property is <B>sensitive</B>. Traditionally, UNIX and POSIX file systems have case-sensitive file names.
<P>
The <B>mixed</B> value for the <B>casesensitivity</B> property indicates that the file system can support requests for both case-sensitive and case-insensitive matching behavior. Currently, case-insensitive matching behavior on a file system that supports mixed behavior is limited to the Solaris CIFS server product. For more information about the <B>mixed</B> value behavior, see the <I>Solaris ZFS Administration Guide</I>.
</DL>

<P>
<P>



<B>normalization</B> = <B>none</B> | <B>formC</B> | <B>formD</B> | <B>formKC</B> | <B>formKD</B>

<P>
<DL COMPACT><DT><DD>
Indicates whether the file system should perform a <B>unicode</B> normalization of file names whenever two file names are compared, and which normalization algorithm should be used. File names are always stored unmodified, names are normalized as part of any comparison process. If this property is set to a legal value other than <B>none</B>, and the <B>utf8only</B> property was left unspecified, the <B>utf8only</B> property is automatically set to <B>on</B>. The default value of the <B>normalization</B> property is <B>none</B>. This property cannot be changed after the file system is created.
</DL>

<P>
<P>



<B>utf8only</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Indicates whether the file system should reject file names that include characters that are not present in the <B>UTF-8</B> character code set. If this property is explicitly set to <B>off</B>, the normalization property must either not be explicitly set or be set to <B>none</B>. The default value for the <B>utf8only</B> property is <B>off</B>. This property cannot be changed after the file system is created.
</DL>

<P>
<P>
<P>

The <B>casesensitivity</B>, <B>normalization</B>, and <B>utf8only</B> properties are also new permissions that can be assigned to non-privileged users by using the <B>ZFS</B> delegated administration feature.

<P>
<P>



<B>context</B>=<B>SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level</B>

<P>
<DL COMPACT><DT><DD>
This flag sets the SELinux context for all files in the filesytem under the mountpoint for that filesystem.  See <B><A HREF="../man8/selinux.8.html">selinux</A></B>(8) for more information.
</DL>

<P>
<P>



<B>fscontext</B>=<B>SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level</B>

<P>
<DL COMPACT><DT><DD>
This flag sets the SELinux context for the filesytem being mounted.  See <B><A HREF="../man8/selinux.8.html">selinux</A></B>(8) for more information.
</DL>

<P>
<P>



<B>defntext</B>=<B>SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level</B>

<P>
<DL COMPACT><DT><DD>
This flag sets the SELinux context for unlabeled files.  See <B><A HREF="../man8/selinux.8.html">selinux</A></B>(8) for more information.
</DL>

<P>
<P>



<B>rootcontext</B>=<B>SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level</B>

<P>
<DL COMPACT><DT><DD>
This flag sets the SELinux context for the root inode of the filesystem.  See <B><A HREF="../man8/selinux.8.html">selinux</A></B>(8) for more information.
</DL>

<P>
<P>



<B>overlay</B>=<B>on</B> | <B>off</B>

<P>
<DL COMPACT><DT><DD>
Allow mounting on a busy directory or a directory which already contains files/directories. This is the default mount behavior for Linux filesystems.  However, for consistency with ZFS on other platforms overlay mounts are disabled by default.  Set <B>overlay=on</B> to enable overlay mounts.
</DL>

<P>
<A NAME="lbAL">&nbsp;</A>
<H3>Temporary Mount Point Properties</H3>

<P>

When a file system is mounted, either through <B><A HREF="../man8/mount.8.html">mount</A></B>(8) for legacy mounts or the <B>zfs mount</B> command for normal file systems, its mount options are set according to its properties. The correlation between properties and mount options is as follows:
<P>

<PRE>
    PROPERTY                MOUNT OPTION
     devices                 devices/nodevices
     exec                    exec/noexec
     readonly                ro/rw
     setuid                  setuid/nosetuid
     xattr                   xattr/noxattr
     atime                   atime/noatime
     relatime                relatime/norelatime
     nbmand                  nbmand/nonbmand
</PRE>


<P>
<P>
<P>
<P>

In addition, these options can be set on a per-mount basis using the <B>-o</B> option, without affecting the property that is stored on disk. The values specified on the command line override the values stored in the dataset. The <B>-nosuid</B> option is an alias for <B>nodevices,nosetuid</B>. These properties are reported as &quot;temporary&quot; by the <B>zfs get</B> command. If the properties are changed while the dataset is mounted, the new setting overrides any temporary settings.
<A NAME="lbAM">&nbsp;</A>
<H3>User Properties</H3>

<P>

In addition to the standard native properties, <B>ZFS</B> supports arbitrary user properties. User properties have no effect on <B>ZFS</B> behavior, but applications or administrators can use them to annotate datasets (file systems, volumes, and snapshots).
<P>
<P>

User property names must contain a colon (<B>:</B>) character to distinguish them from native properties. They may contain lowercase letters, numbers, and the following punctuation characters: colon (<B>:</B>), dash (<B>-</B>), period (<B>.</B>), and underscore (<B>_</B>). The expected convention is that the property name is divided into two portions such as <I>module</I><B>:</B><I>property</I>, but this namespace is not enforced by <B>ZFS</B>. User property names can be at most 256 characters, and cannot begin with a dash (<B>-</B>).
<P>
<P>

When making programmatic use of user properties, it is strongly suggested to use a reversed <B>DNS</B> domain name for the <I>module</I> component of property names to reduce the chance that two independently-developed packages use the same property name for different purposes. For example, property names beginning with <B>com.sun</B>. are reserved for use by Oracle Corporation (which acquired Sun Microsystems).
<P>
<P>

The values of user properties are arbitrary strings, are always inherited, and are never validated. All of the commands that operate on properties (<B>zfs list</B>, <B>zfs get</B>, <B>zfs set</B>, and so forth) can be used to manipulate both native properties and user properties. Use the <B>zfs inherit</B> command to clear a user property . If the property is not defined in any parent dataset, it is removed entirely. Property values are limited to 1024 characters.
<A NAME="lbAN">&nbsp;</A>
<H3>ZFS Volumes as Swap</H3>

<P>

<B>ZFS</B> volumes may be used as Linux swap devices.  After creating the volume
with the <B>zfs create</B> command set up and enable the swap area using the
<B><A HREF="../man8/mkswap.8.html">mkswap</A></B>(8) and <B><A HREF="../man8/swapon.8.html">swapon</A></B>(8) commands.  Do not swap to a file on a
<B>ZFS</B> file system. A <B>ZFS</B> swap file configuration is not supported.
<A NAME="lbAO">&nbsp;</A>
<H2>SUBCOMMANDS</H2>

<P>

All subcommands that modify state are logged persistently to the pool in their original form.
<P>



<B>zfs ?</B>

<P>
<DL COMPACT><DT><DD>
Displays a help message.
</DL>

<P>
<P>



<B>zfs create</B> [<B>-p</B>] [<B>-o</B> <I>property</I>=<I>value</I>] ... <I>filesystem</I>

<P>
<DL COMPACT><DT><DD>
Creates a new <B>ZFS</B> file system. The file system is automatically mounted according to the <B>mountpoint</B> property inherited from the parent.
<P>



<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the <B>mountpoint</B> property inherited from their parent. Any property specified on the command line using the <B>-o</B> option is ignored. If the target filesystem already exists, the operation completes successfully.
</DL>

<P>
<P>



<B>-o</B> <I>property</I>=<I>value</I>

<P>
<DL COMPACT><DT><DD>
Sets the specified property as if the command <B>zfs set</B> <I>property</I>=<I>value</I> was invoked at the same time the dataset was created. Any editable <B>ZFS</B> property can also be set at creation time. Multiple <B>-o</B> options can be specified. An error results if the same property is specified in multiple <B>-o</B> options.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs create</B> [<B>-ps</B>] [<B>-b</B> <I>blocksize</I>] [<B>-o</B> <I>property</I>=<I>value</I>] ... <B>-V</B> <I>size</I> <I>volume</I>

<P>
<DL COMPACT><DT><DD>
Creates a volume of the given size. The volume is exported as a block device in <B>/dev/zvol/</B><I>path</I>, where <I>path</I> is the name of the volume in the <B>ZFS</B> namespace. The size represents the logical size as exported by the device. By default, a reservation of equal size is created.
<P>
<I>size</I> is automatically rounded up to the nearest 128 Kbytes to ensure that the volume has an integral number of blocks regardless of <I>blocksize</I>.
<P>



<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the <B>mountpoint</B> property inherited from their parent. Any property specified on the command line using the <B>-o</B> option is ignored. If the target filesystem already exists, the operation completes successfully.
</DL>

<P>
<P>



<B>-s</B>

<P>
<DL COMPACT><DT><DD>
Creates a sparse volume with no reservation. See <B>volsize</B> in the Native Properties section for more information about sparse volumes.
</DL>

<P>
<P>



<B>-o</B> <I>property</I>=<I>value</I>

<P>
<DL COMPACT><DT><DD>
Sets the specified property as if the <B>zfs set</B> <I>property</I>=<I>value</I> command was invoked at the same time the dataset was created. Any editable <B>ZFS</B> property can also be set at creation time. Multiple <B>-o</B> options can be specified. An error results if the same property is specified in multiple <B>-o</B> options.
</DL>

<P>
<P>



<B>-b</B> <I>blocksize</I>

<P>
<DL COMPACT><DT><DD>
Equivalent to <B>-o</B> <B>volblocksize</B>=<I>blocksize</I>. If this option is specified in conjunction with <B>-o</B> <B>volblocksize</B>, the resulting behavior is undefined.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs destroy</B> [<B>-fnpRrv</B>] <I>filesystem</I>|<I>volume</I>

<P>
<DL COMPACT><DT><DD>
Destroys the given dataset. By default, the command unshares any file systems that are currently shared, unmounts any file systems that are currently mounted, and refuses to destroy a dataset that has active dependents (children or clones).
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Recursively destroy all children.
</DL>

<P>
<P>



<B>-R</B>

<P>
<DL COMPACT><DT><DD>
Recursively destroy all dependents, including cloned file systems outside the target hierarchy.
</DL>

<P>
<P>



<B>-f</B>

<P>
<DL COMPACT><DT><DD>
Force an unmount of any file systems using the <B>unmount -f</B> command. This option has no effect on non-file systems or unmounted file systems.
</DL>

<P>
<P>


<B>-n</B>

<P>
<DL COMPACT><DT><DD>
Do a dry-run (&quot;No-op&quot;) deletion.  No data will be deleted.  This is
useful in conjunction with the <B>-v</B> or <B>-p</B> flags to determine what
data would be deleted.
</DL>

<P>
<P>


<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Print machine-parsable verbose information about the deleted data.
</DL>

<P>
<P>


<B>-v</B>

<P>
<DL COMPACT><DT><DD>
Print verbose information about the deleted data.
</DL>

<P>
<P>
Extreme care should be taken when applying either the <B>-r</B> or the <B>-R</B> options, as they can destroy large portions of a pool and cause unexpected behavior for mounted file systems in use.
</DL>

<P>
<P>



<B>zfs destroy</B> [<B>-dnpRrv</B>] <I>filesystem</I>|<I>volume</I>@<I>snap</I>[%<I>snap</I>][,...]

<P>
<DL COMPACT><DT><DD>
The given snapshots are destroyed immediately if and only if the <B>zfs destroy</B> command without the <B>-d</B> option would have destroyed it. Such immediate destruction would occur, for example, if the snapshot had no clones and the user-initiated reference count were zero.
<P>
If a snapshot does not qualify for immediate destruction, it is marked for deferred destruction. In this state, it exists as a usable, visible snapshot until both of the preconditions listed above are met, at which point it is destroyed.
<P>
An inclusive range of snapshots may be specified by separating the
first and last snapshots with a percent sign.
The first and/or last snapshots may be left blank, in which case the
filesystem's oldest or newest snapshot will be implied.
<P>
Multiple snapshots
(or ranges of snapshots) of the same filesystem or volume may be specified
in a comma-separated list of snapshots.
Only the snapshot's short name (the
part after the <B>@</B>) should be specified when using a range or
comma-separated list to identify multiple snapshots.
<P>



<B>-d</B>

<P>
<DL COMPACT><DT><DD>
Defer snapshot deletion.
</DL>

<P>
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Destroy (or mark for deferred destruction) all snapshots with this name in descendent file systems.
</DL>

<P>
<P>



<B>-R</B>

<P>
<DL COMPACT><DT><DD>
Recursively destroy all clones of these snapshots, including the clones,
snapshots, and children.  If this flag is specified, the <B>-d</B> flag will
have no effect.
</DL>

<P>
<P>


<B>-n</B>

<P>
<DL COMPACT><DT><DD>
Do a dry-run (&quot;No-op&quot;) deletion.  No data will be deleted.  This is
useful in conjunction with the <B>-v</B> or <B>-p</B> flags to determine what
data would be deleted.
</DL>

<P>
<P>


<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Print machine-parsable verbose information about the deleted data.
</DL>

<P>
<P>


<B>-v</B>

<P>
<DL COMPACT><DT><DD>
Print verbose information about the deleted data.
</DL>

<P>
<P>
Extreme care should be taken when applying either the <B>-r</B> or the <B>-R</B>
options, as they can destroy large portions of a pool and cause unexpected
behavior for mounted file systems in use.
</DL>

<P>

<P>
<P>



<B>zfs destroy</B> <I>filesystem</I>|<I>volume</I>#<I>bookmark</I>

<P>
<DL COMPACT><DT><DD>
The given bookmark is destroyed.
<P>
</DL>

<P>
<P>


<B>zfs snapshot</B> [<B>-r</B>] [<B>-o</B> <I>property</I>=<I>value</I>] ... <I>filesystem@snapname</A></I>|<I><A HREF="mailto:volume@snapname">volume@snapname</I> ...

<P>
<DL COMPACT><DT><DD>
Creates snapshots with the given names. All previous modifications by successful system calls to the file system are part of the snapshots. Snapshots are taken atomically, so that all snapshots correspond to the same moment in time. See the &quot;Snapshots&quot; section for details.
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Recursively create snapshots of all descendent datasets.
</DL>

<P>
<P>



<B>-o</B> <I>property</I>=<I>value</I>

<P>
<DL COMPACT><DT><DD>
Sets the specified property; see <B>zfs create</B> for details.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs rollback</B> [<B>-rRf</B>] <I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
Roll back the given dataset to a previous snapshot. When a dataset is rolled back, all data that has changed since the snapshot is discarded, and the dataset reverts to the state at the time of the snapshot. By default, the command refuses to roll back to a snapshot other than the most recent one. In order to do so, all intermediate snapshots and bookmarks must be destroyed by specifying the <B>-r</B> option.
<P>
The <B>-rR</B> options do not recursively destroy the child snapshots of a recursive snapshot. Only direct snapshots of the specified filesystem are destroyed by either of these options. To completely roll back a recursive snapshot, you must rollback the individual child snapshots.
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Destroy any snapshots and bookmarks more recent than the one specified.
</DL>

<P>
<P>



<B>-R</B>

<P>
<DL COMPACT><DT><DD>
Recursively destroy any more recent snapshots and bookmarks, as well as any clones of those snapshots.
</DL>

<P>
<P>



<B>-f</B>

<P>
<DL COMPACT><DT><DD>
Used with the <B>-R</B> option to force an unmount of any clone file systems that are to be destroyed.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs clone</B> [<B>-p</B>] [<B>-o</B> <I>property</I>=<I>value</I>] ... <I>snapshot</I> <I>filesystem</I>|<I>volume</I>

<P>
<DL COMPACT><DT><DD>
Creates a clone of the given snapshot. See the &quot;Clones&quot; section for details. The target dataset can be located anywhere in the <B>ZFS</B> hierarchy, and is created as the same type as the original.
<P>



<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Creates all the non-existing parent datasets. Datasets created in this manner are automatically mounted according to the <B>mountpoint</B> property inherited from their parent. If the target filesystem or volume already exists, the operation completes successfully.
</DL>

<P>
<P>



<B>-o</B> <I>property</I>=<I>value</I>

<P>
<DL COMPACT><DT><DD>
Sets the specified property; see <B>zfs create</B> for details.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs promote</B> <I>clone-filesystem</I>

<P>
<DL COMPACT><DT><DD>
Promotes a clone file system to no longer be dependent on its &quot;origin&quot; snapshot. This makes it possible to destroy the file system that the clone was created from. The clone parent-child dependency relationship is reversed, so that the origin file system becomes a clone of the specified file system. 
<P>
The snapshot that was cloned, and any snapshots previous to this snapshot, are now owned by the promoted clone. The space they use moves from the origin file system to the promoted clone, so enough space must be available to accommodate these snapshots. No new space is consumed by this operation, but the space accounting is adjusted. The promoted clone must not have any conflicting snapshot names of its own. The <B>rename</B> subcommand can be used to rename any conflicting snapshots.
</DL>

<P>
<P>



<B>zfs rename</B> [<B>-f</B>] <I>filesystem</I>|<I>volume</I>|<I>snapshot</I>

<BR>


<B></B><I>filesystem</I>|<I>volume</I>|<I>snapshot</I>

<BR>


<B>zfs rename</B> [<B>-fp</B>] <I>filesystem</I>|<I>volume</I> <I>filesystem</I>|<I>volume</I>

<P>
<DL COMPACT><DT><DD>
Renames the given dataset. The new target can be located anywhere in the <B>ZFS</B> hierarchy, with the exception of snapshots. Snapshots can only be renamed within the parent file system or volume. When renaming a snapshot, the parent file system of the snapshot does not need to be specified as part of the second argument. Renamed file systems can inherit new mount points, in which case they are unmounted and remounted at the new mount point.
<P>



<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the <B>mountpoint</B> property inherited from their parent.
</DL>

<P>
<P>


<B>-f</B>

<P>
<DL COMPACT><DT><DD>
Force unmount any filesystems that need to be unmounted in the process.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs rename</B> <B>-r</B> <I>snapshot</I> <I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
Recursively rename the snapshots of all descendent datasets. Snapshots are the only dataset that can be renamed recursively.
</DL>

<P>
<P>



<B>zfs</B> <B>list</B> [<B>-r</B>|<B>-d</B> <I>depth</I>] [<B>-Hp</B>] [<B>-o</B> <I>property</I>[,<I>...</I>]] [ <B>-t</B> <I>type</I>[,<I>...</I>]] [ <B>-s</B> <I>property</I> ] ... [ <B>-S</B> <I>property</I> ] ... [<I>filesystem</I>|<I>volume</I>|<I>snapshot</I>] ...

<P>
<DL COMPACT><DT><DD>
Lists the property information for the given datasets in tabular form. If specified, you can list property information by the absolute pathname or the relative pathname. By default, all file systems and volumes are displayed. Snapshots are displayed if the <B>listsnaps</B> property is <B>on</B> (the default is <B>off</B>). When listing hundreds or thousands of snapshots performance can be improved by restricting the output to only the name.  In that case, it is recommended to use <B>-o name -s name</B>. The following fields are displayed by default, <B>name,used,available,referenced,mountpoint</B>.
<P>



<B>-H</B>

<P>
<DL COMPACT><DT><DD>
Used for scripting mode. Do not print headers and separate fields by a single tab instead of arbitrary white space.
</DL>

<P>
<P>



<B>-p</B>
<P>
<DL COMPACT><DT><DD>
Display numbers in parsable (exact) values.
</DL>

<P>
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Recursively display any children of the dataset on the command line. 
</DL>

<P>
<P>



<B>-d</B> <I>depth</I>

<P>
<DL COMPACT><DT><DD>
Recursively display any children of the dataset, limiting the recursion to <I>depth</I>. A depth of <B>1</B> will display only the dataset and its direct children.
</DL>

<P>
<P>



<B>-o</B> <I>property</I>

<P>
<DL COMPACT><DT><DD>
A comma-separated list of properties to display. The property must be:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
One of the properties described in the &quot;Native Properties&quot; section
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
A user property
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
The value <B>name</B> to display the dataset name
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
The value <B>space</B> to display space usage properties on file systems and volumes. This is a shortcut for specifying <B>-o name,avail,used,usedsnap,usedds,usedrefreserv,usedchild</B> <B>-t filesystem,volume</B> syntax.
</DL>
</DL>

</DL>

<P>
<P>



<B>-s</B> <I>property</I>

<P>
<DL COMPACT><DT><DD>
A property for sorting the output by column in ascending order based on the value of the property. The property must be one of the properties described in the &quot;Properties&quot; section, or the special value <B>name</B> to sort by the dataset name. Multiple properties can be specified at one time using multiple <B>-s</B> property options. Multiple <B>-s</B> options are evaluated from left to right in decreasing order of importance.
<P>
The following is a list of sorting criteria:
<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
Numeric types sort in numeric order.
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
String types sort in alphabetical order.
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
Types inappropriate for a row sort that row to the literal bottom, regardless of the specified ordering.
</DL>
</DL>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>
<DD>
o
If no sorting options are specified the existing behavior of <B>zfs list</B> is preserved.
</DL>
</DL>

</DL>

<P>
<P>



<B>-S</B> <I>property</I>

<P>
<DL COMPACT><DT><DD>
Same as the <B>-s</B> option, but sorts by property in descending order. 
</DL>

<P>
<P>



<B>-t</B> <I>type</I>

<P>
<DL COMPACT><DT><DD>
A comma-separated list of types to display, where <I>type</I> is one of <B>filesystem</B>, <B>snapshot</B>, <B>snap</B>, <B>volume</B>, <B>bookmark</B>, or <B>all</B>. For example, specifying <B>-t snapshot</B> displays only snapshots.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs set</B> <I>property</I>=<I>value</I> <I>filesystem</I>|<I>volume</I>|<I>snapshot</I> ...

<P>
<DL COMPACT><DT><DD>
Sets the property to the given value for each dataset. Only some properties can be edited. See the &quot;Properties&quot; section for more information on what properties can be set and acceptable values. Numeric values can be specified as exact values, or in a human-readable form with a suffix of <B>B</B>, <B>K</B>, <B>M</B>, <B>G</B>, <B>T</B>, <B>P</B>, <B>E</B>, <B>Z</B> (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User properties can be set on snapshots. For more information, see the &quot;User Properties&quot; section.
</DL>

<P>
<P>


<B>zfs get</B> [<B>-r</B>|<B>-d</B> <I>depth</I>] [<B>-Hp</B>] [<B>-o</B> <I>field</I>[,...] [<B>-t</B> <I>type</I>[,...]] [<B>-s</B> <I>source</I>[,...] &quot;<I>all</I>&quot; | <I>property</I>[,...] <I>filesystem</I>|<I>volume</I>|<I>snapshot</I> ...

<P>
<DL COMPACT><DT><DD>
Displays properties for the given datasets. If no datasets are specified, then the command displays properties for all datasets on the system. For each property, the following columns are displayed:
<P>

<PRE>
    name      Dataset name
     property  Property name
     value     Property value
     source    Property source. Can either be local, default,
               temporary, inherited, received, or none (-).
</PRE>


<P>
<P>
All columns are displayed by default, though this can be controlled by using the <B>-o</B> option. This command takes a comma-separated list of properties as described in the &quot;Native Properties&quot; and &quot;User Properties&quot; sections.
<P>
The special value <B>all</B> can be used to display all properties that apply to the given dataset's type (filesystem, volume snapshot, or bookmark).
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Recursively display properties for any children.
</DL>

<P>
<P>



<B>-d</B> <I>depth</I>

<P>
<DL COMPACT><DT><DD>
Recursively display any children of the dataset, limiting the recursion to <I>depth</I>. A depth of <B>1</B> will display only the dataset and its direct children.
</DL>

<P>
<P>



<B>-H</B>

<P>
<DL COMPACT><DT><DD>
Display output in a form more easily parsed by scripts. Any headers are omitted, and fields are explicitly separated by a single tab instead of an arbitrary amount of space.
</DL>

<P>
<P>



<B>-o</B> <I>field</I>

<P>
<DL COMPACT><DT><DD>
A comma-separated list of columns to display. <B>name,property,value,source</B> is the default value. 
</DL>

<P>
<P>



<B>-s</B> <I>source</I>

<P>
<DL COMPACT><DT><DD>
A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of the following: <B>local,default,inherited,received,temporary,none</B>. The default value is all sources.
</DL>

<P>
<P>



<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Display numbers in parsable (exact) values.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs inherit</B> [<B>-rS</B>] <I>property</I> <I>filesystem</I>|<I>volume</I>|<I>snapshot</I> ...

<P>
<DL COMPACT><DT><DD>
Clears the specified property, causing it to be inherited from an ancestor, restored to default if no ancestor has the property set, or with the <B>-S</B> option reverted to the received value if one exists.  See the &quot;Properties&quot; section for a listing of default values, and details on which properties can be inherited.
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Recursively inherit the given property for all children.
</DL>

<P>


<B>-S</B>

<P>
<DL COMPACT><DT><DD>
Revert the property to the received value if one exists; otherwise operate as
if the <B>-S</B> option was not specified.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs upgrade</B> [<B>-v</B>]

<P>
<DL COMPACT><DT><DD>
Displays a list of file systems that are not the most recent version.
</DL>

<P>
<P>



<B>zfs upgrade</B> [<B>-r</B>] [<B>-V</B> <I>version</I>] [<B>-a</B> | <I>filesystem</I>]

<P>
<DL COMPACT><DT><DD>
Upgrades file systems to a new on-disk version. Once this is done, the file systems will no longer be accessible on systems running older versions of the software. <B>zfs send</B> streams generated from new snapshots of these file systems cannot be accessed on systems running older versions of the software.
<P>
In general, the file system version is independent of the pool version. See <B><A HREF="../man8/zpool.8.html">zpool</A></B>(8) for information on the <B>zpool upgrade</B> command. 
<P>
In some cases, the file system version and the pool version are interrelated and the pool version must be upgraded before the file system version can be upgraded.
<P>



<B>-a</B>

<P>
<DL COMPACT><DT><DD>
Upgrade all file systems on all imported pools.
</DL>

<P>
<P>



<B></B><I>filesystem</I>

<P>
<DL COMPACT><DT><DD>
Upgrade the specified file system. 
</DL>

<P>
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Upgrade the specified file system and all descendent file systems 
</DL>

<P>
<P>



<B>-V</B> <I>version</I>

<P>
<DL COMPACT><DT><DD>
Upgrade to the specified <I>version</I>. If the <B>-V</B> flag is not specified, this command upgrades to the most recent version. This option can only be used to increase the version number, and only up to the most recent version supported by this software.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs</B> <B>userspace</B> [<B>-Hinp</B>] [<B>-o</B> <I>field</I>[,...]]
[<B>-s</B> <I>field</I>] ...
[<B>-S</B> <I>field</I>] ...
[<B>-t</B> <I>type</I>[,...]] <I>filesystem</I>|<I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
Displays space consumed by, and quotas on, each user in the specified
filesystem or snapshot. This corresponds to the <B>userused@</B><I>user</I> and
<B>userquota@</B><I>user</I> properties.
<P>



<B>-n</B>

<P>
<DL COMPACT><DT><DD>
Print numeric ID instead of user/group name.
</DL>

<P>
<P>



<B>-H</B>

<P>
<DL COMPACT><DT><DD>
Do not print headers, use tab-delimited output.
</DL>

<P>
<P>



<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Use exact (parsable) numeric output.
</DL>

<P>
<P>



<B>-o</B> <I>field</I>[,...]

<P>
<DL COMPACT><DT><DD>
Display only the specified fields from the following
set: <B>type, name, used, quota</B>. The default is to display all fields.
</DL>

<P>
<P>



<B>-s</B> <I>field</I>

<P>
<DL COMPACT><DT><DD>
Sort output by this field. The <I>s</I> and <I>S</I> flags may be specified
multiple times to sort first by one field, then by another. The default is
<B>-s type</B> <B>-s name</B>.
</DL>

<P>
<P>



<B>-S</B> <I>field</I>

<P>
<DL COMPACT><DT><DD>
Sort by this field in reverse order. See <B>-s</B>.
</DL>

<P>
<P>



<B>-t</B> <I>type</I>[,...]

<P>
<DL COMPACT><DT><DD>
Print only the specified types from the following
set: <B>all, posixuser, smbuser, posixgroup, smbgroup</B>. The default
is <B>-t posixuser,smbuser</B>. The default can be changed to include group
types.
</DL>

<P>
<P>



<B>-i</B>

<P>
<DL COMPACT><DT><DD>
Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
Normal POSIX interfaces (for example, <B><A HREF="../man2/stat.2.html">stat</A></B>(2), <B>ls</B> <B>-l</B>) perform
this translation, so the <B>-i</B> option allows the output from <B>zfs
userspace</B> to be compared directly with those utilities. However, <B>-i</B>
may lead to confusion if some files were created by an SMB user before a
SMB-to-POSIX name mapping was established. In such a case, some files will be owned
by the SMB entity and some by the POSIX entity. However, the <B>-i</B> option
will report that the POSIX entity has the total usage and quota for both.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs</B> <B>groupspace</B> [<B>-Hinp</B>] [<B>-o</B> <I>field</I>[,...]]
[<B>-s</B> <I>field</I>] ...
[<B>-S</B> <I>field</I>] ...
[<B>-t</B> <I>type</I>[,...]] <I>filesystem</I>|<I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
Displays space consumed by, and quotas on, each group in the specified
filesystem or snapshot. This subcommand is identical to <B>zfs userspace</B>,
except that the default types to display are <B>-t posixgroup,smbgroup</B>.
</DL>

<P>
<P>



<B>zfs mount</B>

<P>
<DL COMPACT><DT><DD>
Displays all <B>ZFS</B> file systems currently mounted.
</DL>

<P>
<P>



<B>zfs mount</B> [<B>-vO</B>] [<B>-o</B> <I>options</I>] <B>-a</B> | <I>filesystem</I>

<P>
<DL COMPACT><DT><DD>
Mounts <B>ZFS</B> file systems. Invoked automatically as part of the boot process.
<P>



<B>-o</B> <I>options</I>

<P>
<DL COMPACT><DT><DD>
An optional, comma-separated list of mount options to use temporarily for the
duration of the mount. See the &quot;Temporary Mount Point Properties&quot; section for
details.
</DL>

<P>
<P>



<B>-O</B>

<P>
<DL COMPACT><DT><DD>
Perform an overlay mount. See <B><A HREF="../man8/mount.8.html">mount</A></B>(8) for more information.
</DL>

<P>
<P>



<B>-v</B>

<P>
<DL COMPACT><DT><DD>
Report mount progress.
</DL>

<P>
<P>



<B>-a</B>

<P>
<DL COMPACT><DT><DD>
Mount all available <B>ZFS</B> file systems. Invoked automatically as part of
the boot process.
</DL>

<P>
<P>



<B></B><I>filesystem</I>

<P>
<DL COMPACT><DT><DD>
Mount the specified filesystem.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs unmount</B> [<B>-f</B>] <B>-a</B> | <I>filesystem</I>|<I>mountpoint</I>

<P>
<DL COMPACT><DT><DD>
Unmounts currently mounted <B>ZFS</B> file systems. Invoked automatically as part of the shutdown process.
<P>



<B>-f</B>

<P>
<DL COMPACT><DT><DD>
Forcefully unmount the file system, even if it is currently in use.
</DL>

<P>
<P>



<B>-a</B>

<P>
<DL COMPACT><DT><DD>
Unmount all available <B>ZFS</B> file systems. Invoked automatically as part of the boot process. 
</DL>

<P>
<P>



<B></B><I>filesystem</I>|<I>mountpoint</I>

<P>
<DL COMPACT><DT><DD>
Unmount the specified filesystem. The command can also be given a path to a <B>ZFS</B> file system mount point on the system.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs share</B> <B>-a</B> | <I>filesystem</I>

<P>
<DL COMPACT><DT><DD>
Shares available <B>ZFS</B> file systems. 
<P>



<B>-a</B>

<P>
<DL COMPACT><DT><DD>
Share all available <B>ZFS</B> file systems. Invoked automatically as part of the boot process. 
</DL>

<P>
<P>



<B></B><I>filesystem</I>

<P>
<DL COMPACT><DT><DD>
Share the specified filesystem according to the <B>sharenfs</B> and <B>sharesmb</B> properties. File systems are shared when the <B>sharenfs</B> or <B>sharesmb</B> property is set.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs unshare</B> <B>-a</B> | <I>filesystem</I>|<I>mountpoint</I>

<P>
<DL COMPACT><DT><DD>
Unshares currently shared <B>ZFS</B> file systems. This is invoked automatically as part of the shutdown process.
<P>



<B>-a</B>

<P>
<DL COMPACT><DT><DD>
Unshare all available <B>ZFS</B> file systems. Invoked automatically as part of the boot process. 
</DL>

<P>
<P>



<B></B><I>filesystem</I>|<I>mountpoint</I>

<P>
<DL COMPACT><DT><DD>
Unshare the specified filesystem. The command can also be given a path to a <B>ZFS</B> file system shared on the system.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs bookmark</B> <I>snapshot</I> <I>bookmark</I>

<P>
<DL COMPACT><DT><DD>
Creates a bookmark of the given snapshot.  Bookmarks mark the point in time
when the snapshot was created, and can be used as the incremental source for
a <B>zfs send</B> command.
<P>
This feature must be enabled to be used.
See <B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for details on ZFS feature flags and the
<B>bookmarks</B> feature.
</DL>

<P>
<P>

<P>


<B>zfs send</B> [<B>-DnPpRveL</B>] [<B>-</B>[<B>iI</B>] <I>snapshot</I>] <I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
Creates a stream representation of the second <I>snapshot</I>, which is written to standard output. The output can be redirected to a file or to a different system (for example, using <B><A HREF="../man1/ssh.1.html">ssh</A></B>(1). By default, a full stream is generated.
<P>



<B>-i</B> <I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
Generate an incremental stream from the first <I>snapshot</I> (the incremental source) to the second <I>snapshot</I> (the incremental target).  The incremental source can be specified as the last component of the snapshot name (the <B>@</B> character and following) and it is assumed to be from the same file system as the incremental target.
<P>
If the destination is a clone, the source may be the origin snapshot, which must be fully specified (for example, <B>pool/fs@origin</B>, not just <B>@origin</B>).
</DL>

<P>
<P>



<B>-I</B> <I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
Generate a stream package that sends all intermediary snapshots from the first snapshot to the second snapshot. For example, <B>-I @a fs@d</B> is similar to <B>-i @a fs@b; -i @b fs@c; -i @c fs@d</B>. The incremental source may be specified as with the <B>-i</B> option.
</DL>

<P>
<P>



<B>-R</B>

<P>
<DL COMPACT><DT><DD>
Generate a replication stream package, which will replicate the specified filesystem, and all descendent file systems, up to the named snapshot. When received, all properties, snapshots, descendent file systems, and clones are preserved.
<P>
If the <B>-i</B> or <B>-I</B> flags are used in conjunction with the <B>-R</B> flag, an incremental replication stream is generated. The current values of properties, and current snapshot and file system names are set when the stream is received. If the <B>-F</B> flag is specified when this stream is received, snapshots and file systems that do not exist on the sending side are destroyed. 
</DL>

<P>
<P>



<B>-D</B>

<P>
<DL COMPACT><DT><DD>
Generate a deduplicated stream. Blocks which would have been sent multiple times in the send stream will only be sent once. The receiving system must also support this feature to receive a deduplicated stream.  This flag can be used regardless of the dataset's dedup  property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg.  sha256).
</DL>

<P>
<P>



<B>-L</B>

<P>
<DL COMPACT><DT><DD>
Generate a stream which may contain blocks larger than 128KB.  This flag
has no effect if the <B>large_blocks</B> pool feature is disabled, or if
the recordsize property of this filesystem has never been set above
128KB.  The receiving system must have the <B>large_blocks</B> pool feature
enabled as well.  See <B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for details on ZFS feature
flags and the <B>large_blocks</B> feature.
</DL>

<P>
<P>



<B>-e</B>

<P>
<DL COMPACT><DT><DD>
Generate a more compact stream by using WRITE_EMBEDDED records for blocks
which are stored more compactly on disk by the <B>embedded_data</B> pool
feature.  This flag has no effect if the <B>embedded_data</B> feature is
disabled.  The receiving system must have the <B>embedded_data</B> feature
enabled.  If the <B>lz4_compress</B> feature is active on the sending system,
then the receiving system must have that feature enabled as well. See
<B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for details on ZFS feature flags and the
<B>embedded_data</B> feature.
</DL>

<P>
<P>


<B>-p</B>

<P>
<DL COMPACT><DT><DD>
Include the dataset's properties in the stream.  This flag is implicit when -R is specified.  The receiving system must also support this feature.
</DL>

<P>
<P>


<B>-n</B>

<P>
<DL COMPACT><DT><DD>
Do a dry-run (&quot;No-op&quot;) send.  Do not generate any actual send data.  This is
useful in conjunction with the <B>-v</B> or <B>-P</B> flags to determine what
data will be sent.  In this case, the verbose output will be written to
standard output (contrast with a non-dry-run, where the stream is written
to standard output and the verbose output goes to standard error).
</DL>

<P>
<P>


<B>-P</B>

<P>
<DL COMPACT><DT><DD>
Print machine-parsable verbose information about the stream package generated.
</DL>

<P>
<P>



<B>-v</B>

<P>
<DL COMPACT><DT><DD>
Print verbose information about the stream package generated.  This information
includes a per-second report of how much data has been sent.
</DL>

<P>
The format of the stream is committed. You will be able to receive your streams on future versions of <B>ZFS</B>.
</DL>

<P>

<P>


<B>zfs send</B> [<B>-eL</B>] [<B>-i</B> <I>snapshot</I>|<I>bookmark</I>] <I>filesystem</I>|<I>volume</I>|<I>snapshot</I>

<P>
<DL COMPACT><DT><DD>
Generate a send stream, which may be of a filesystem, and may be
incremental from a bookmark.  If the destination is a filesystem or volume,
the pool must be read-only, or the filesystem must not be mounted.  When the
stream generated from a filesystem or volume is received, the default snapshot
name will be &quot;--head--&quot;.
<P>
<P>


<B>-i</B> <I>snapshot</I>|<I>bookmark</I>

<P>
<DL COMPACT><DT><DD>
Generate an incremental send stream.  The incremental source must be an earlier
snapshot in the destination's history. It will commonly be an earlier
snapshot in the destination's filesystem, in which case it can be
specified as the last component of the name (the <B>#</B> or <B>@</B> character
and following).
<P>
If the incremental target is a clone, the incremental source can
be the origin snapshot, or an earlier snapshot in the origin's filesystem,
or the origin's origin, etc.
</DL>

<P>
<P>



<B>-L</B>

<P>
<DL COMPACT><DT><DD>
Generate a stream which may contain blocks larger than 128KB.  This flag
has no effect if the <B>large_blocks</B> pool feature is disabled, or if
the recordsize property of this filesystem has never been set above
128KB.  The receiving system must have the <B>large_blocks</B> pool feature
enabled as well.  See <B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for details on ZFS feature
flags and the <B>large_blocks</B> feature.
</DL>

<P>
<P>



<B>-e</B>

<P>
<DL COMPACT><DT><DD>
Generate a more compact stream by using WRITE_EMBEDDED records for blocks
which are stored more compactly on disk by the <B>embedded_data</B> pool
feature.  This flag has no effect if the <B>embedded_data</B> feature is
disabled.  The receiving system must have the <B>embedded_data</B> feature
enabled.  If the <B>lz4_compress</B> feature is active on the sending system,
then the receiving system must have that feature enabled as well. See
<B><A HREF="../man5/zpool-features.5.html">zpool-features</A></B>(5) for details on ZFS feature flags and the
<B>embedded_data</B> feature.
</DL>

<P>
</DL>

<P>



<B>zfs receive</B> [<B>-vnFu</B>] <I>filesystem</I>|<I>volume</I>|<I>snapshot</I>

<BR>


<B>zfs receive</B> [<B>-vnFu</B>] [<B>-d</B>|<B>-e</B>] <I>filesystem</I>

<P>
<DL COMPACT><DT><DD>
Creates a snapshot whose contents are as specified in the stream provided on standard input. If a full stream is received, then a new file system is created as well. Streams are created using the <B>zfs send</B> subcommand, which by default creates a full stream. <B>zfs recv</B> can be used as an alias for <B>zfs receive</B>.
<P>
If an incremental stream is received, then the destination file system must already exist, and its most recent snapshot must match the incremental stream's source. For <B>zvols</B>, the destination device link is destroyed and recreated, which means the <B>zvol</B> cannot be accessed during the <B>receive</B> operation.
<P>
When a snapshot replication package stream that is generated by using the <B>zfs send</B> <B>-R</B> command is  received, any snapshots that do not exist on the sending location are destroyed by using the <B>zfs destroy</B> <B>-d</B> command.
<P>
The name of the snapshot (and file system, if a full stream is received) that this subcommand creates depends on the argument type and the use of the <B>-d</B> or <B>-e</B> options.
<P>
If the argument is a snapshot name, the specified <I>snapshot</I> is created. If the argument is a file system or volume name, a snapshot with the same name as the sent snapshot is created within the specified <I>filesystem</I> or <I>volume</I>.  If neither of the <B>-d</B> or <B>-e</B> options are specified, the provided target snapshot name is used exactly as provided.
<P>
The <B>-d</B> and <B>-e</B> options cause the file system name of the target snapshot to be determined by appending a portion of the sent snapshot's name to the specified target <I>filesystem</I>. If the <B>-d</B> option is specified, all but the first element of the sent snapshot's file system path (usually the pool name) is used and any required intermediate file systems within the specified one are created.  If the <B>-e</B> option is specified, then only the last element of the sent snapshot's file system name (i.e. the name of the source file system itself) is used as the target file system name.
<P>



<B>-d</B>

<P>
<DL COMPACT><DT><DD>
Discard the first element of the sent snapshot's file system name, using the remaining elements to determine the name of the target file system for the new snapshot as described in the paragraph above.
</DL>

<P>
<P>


<B>-e</B>

<P>
<DL COMPACT><DT><DD>
Discard all but the last element of the sent snapshot's file system name, using that element to determine the name of the target file system for the new snapshot as described in the paragraph above.
</DL>

<P>
<P>



<B>-u</B>

<P>
<DL COMPACT><DT><DD>
File system that is associated with the received stream is not mounted.
</DL>

<P>
<P>


<B>-v</B>

<P>
<DL COMPACT><DT><DD>
Print verbose information about the stream and the time required to perform the receive operation.
</DL>

<P>
<P>



<B>-n</B>

<P>
<DL COMPACT><DT><DD>
Do not actually receive the stream. This can be useful in conjunction with the <B>-v</B> option to verify the name the receive operation would use.
</DL>

<P>
<P>



<B>-F</B>

<P>
<DL COMPACT><DT><DD>
Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by <B>zfs send -R -[iI]</B>), destroy snapshots and file systems that do not exist on the sending side.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs allow</B> <I>filesystem</I> | <I>volume</I>

<P>
<DL COMPACT><DT><DD>
Displays permissions that have been delegated on the specified filesystem or volume. See the other forms of <B>zfs allow</B> for more information.
</DL>

<P>
<P>



<B>zfs allow</B> [<B>-ldug</B>] &quot;<I>everyone</I>&quot;|<I>user</I>|<I>group</I>[,...] <I>perm</I>|@<I>setname</I>[,...] <I>filesystem</I>| <I>volume</I>

<BR>


<B>zfs allow</B> [<B>-ld</B>] <B>-e</B> <I>perm</I>|@<I>setname</I>[,...] <I>filesystem</I> | <I>volume</I>

<P>
<DL COMPACT><DT><DD>
Delegates <B>ZFS</B> administration permission for the file systems to non-privileged users.
<P>



<B>[-ug</B>] &quot;<I>everyone</I>&quot;|<I>user</I>|<I>group</I>[,...]

<P>
<DL COMPACT><DT><DD>
Specifies to whom the permissions are delegated. Multiple entities can be specified as a comma-separated list. If neither of the <B>-ug</B> options are specified, then the argument is interpreted preferentially as the keyword &quot;everyone&quot;, then as a user name, and lastly as a group name. To specify a user or group named &quot;everyone&quot;, use the <B>-u</B> or <B>-g</B> options. To specify a group with the same name as a user, use the <B>-g</B> options.
</DL>

<P>
<P>



<B>[-e</B>] <I>perm</I>|@<I>setname</I>[,...]

<P>
<DL COMPACT><DT><DD>
Specifies that the permissions be delegated to &quot;everyone.&quot; Multiple permissions may be specified as a comma-separated list. Permission names are the same as <B>ZFS</B> subcommand and property names. See the property list below. Property set names, which begin with an at sign (<B>@</B>) , may be specified. See the <B>-s</B> form below for details.
</DL>

<P>
<P>



<B>[-ld</B>] <I>filesystem</I>|<I>volume</I>

<P>
<DL COMPACT><DT><DD>
Specifies where the permissions are delegated. If neither of the <B>-ld</B> options are specified, or both are, then the permissions are allowed for the file system or volume, and all of its descendents. If only the <B>-l</B> option is used, then is allowed &quot;locally&quot; only for the specified file system. If only the <B>-d</B> option is used, then is allowed only for the descendent file systems.
</DL>

<P>
</DL>

<P>
<P>
<P>

Permissions are generally the ability to use a <B>ZFS</B> subcommand or change a <B>ZFS</B> property. The following permissions are available:
<P>

<PRE>
NAME             TYPE           NOTES
allow            subcommand     Must also have the permission that is being
                                allowed
clone            subcommand     Must also have the 'create' ability and 'mount'
                                ability in the origin file system
create           subcommand     Must also have the 'mount' ability
destroy          subcommand     Must also have the 'mount' ability
diff             subcommand     Allows lookup of paths within a dataset
                                given an object number, and the ability to
                                create snapshots necessary to 'zfs diff'.
mount            subcommand     Allows mount/umount of ZFS datasets
promote          subcommand     Must also have the 'mount'
                                and 'promote' ability in the origin file system
receive          subcommand     Must also have the 'mount' and 'create' ability
rename           subcommand     Must also have the 'mount' and 'create'
                                ability in the new parent
rollback         subcommand     Must also have the 'mount' ability
send             subcommand     
share            subcommand     Allows sharing file systems over NFS or SMB
                                protocols
snapshot         subcommand     Must also have the 'mount' ability
groupquota       other          Allows accessing any groupquota@... property
groupused        other          Allows reading any groupused@... property
userprop         other          Allows changing any user property
userquota        other          Allows accessing any userquota@... property
userused         other          Allows reading any userused@... property

acltype          property
aclinherit       property       
atime            property       
canmount         property       
casesensitivity  property       
checksum         property       
compression      property       
copies           property       
dedup            property
devices          property       
exec             property       
filesystem_limit property
logbias          property
mlslabel         property
mountpoint       property       
nbmand           property       
normalization    property       
primarycache     property       
quota            property       
readonly         property       
recordsize       property       
refquota         property       
refreservation   property       
reservation      property       
secondarycache   property       
setuid           property       
shareiscsi       property       
sharenfs         property       
sharesmb         property       
snapdir          property       
snapshot_limit   property
utf8only         property       
version          property       
volblocksize     property       
volsize          property       
vscan            property       
xattr            property       
zoned            property       
</PRE>


<P>
<P>
<P>



<B>zfs allow</B> <B>-c</B> <I>perm</I>|@<I>setname</I>[,...] <I>filesystem</I>|<I>volume</I>

<P>
<DL COMPACT><DT><DD>
Sets &quot;create time&quot; permissions. These permissions are granted (locally) to the creator of any newly-created descendent file system.
</DL>

<P>
<P>



<B>zfs allow</B> <B>-s</B> @<I>setname</I> <I>perm</I>|@<I>setname</I>[,...] <I>filesystem</I>|<I>volume</I>

<P>
<DL COMPACT><DT><DD>
Defines or adds permissions to a permission set. The set can be used by other <B>zfs allow</B> commands for the specified file system and its descendents. Sets are evaluated dynamically, so changes to a set are immediately reflected. Permission sets follow the same naming restrictions as ZFS file systems, but the name must begin with an &quot;at sign&quot; (<B>@</B>), and can be no more than 64 characters long.
</DL>

<P>
<P>



<B>zfs unallow</B> [<B>-rldug</B>] &quot;<I>everyone</I>&quot;|<I>user</I>|<I>group</I>[,...] [<I>perm</I>|@<I>setname</I>[, ...]] <I>filesystem</I>|<I>volume</I>

<BR>


<B>zfs unallow</B> [<B>-rld</B>] <B>-e</B> [<I>perm</I>|@<I>setname</I> [,...]] <I>filesystem</I>|<I>volume</I>

<BR>


<B>zfs unallow</B> [<B>-r</B>] <B>-c</B> [<I>perm</I>|@<I>setname</I>[,...]]

<BR>


<B></B><I>filesystem</I>|<I>volume</I>

<P>
<DL COMPACT><DT><DD>
Removes permissions that were granted with the <B>zfs allow</B> command. No permissions are explicitly denied, so other permissions granted are still in effect. For example, if the permission is granted by an ancestor. If no permissions are specified, then all permissions for the specified <I>user</I>, <I>group</I>, or <I>everyone</I> are removed. Specifying &quot;everyone&quot; (or using the <B>-e</B> option) only removes the permissions that were granted to &quot;everyone&quot;, not all permissions for every user and group. See the <B>zfs allow</B> command for a description of the <B>-ldugec</B> options.
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Recursively remove the permissions from this file system and all descendents.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs unallow</B> [<B>-r</B>] <B>-s</B> @<I>setname</I> [<I>perm</I>|@<I>setname</I>[,...]]

<BR>


<B></B><I>filesystem</I>|<I>volume</I>

<P>
<DL COMPACT><DT><DD>
Removes permissions from a permission set. If no permissions are specified, then all permissions are removed, thus removing the set entirely.
</DL>

<P>
<P>



<B>zfs hold</B> [<B>-r</B>] <I>tag</I> <I>snapshot</I>...

<P>
<DL COMPACT><DT><DD>
Adds a single reference, named with the <I>tag</I> argument, to the specified snapshot or snapshots. Each snapshot has its own tag namespace, and tags must be unique within that space.
<P>
If a hold exists on a snapshot, attempts to destroy that snapshot by using the <B>zfs destroy</B> command return <B>EBUSY</B>.
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs holds</B> [<B>-r</B>] <I>snapshot</I>...

<P>
<DL COMPACT><DT><DD>
Lists all existing user references for the given snapshot or snapshots.
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Lists the holds that are set on the named descendent snapshots, in addition to listing the holds on the named snapshot.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs release</B> [<B>-r</B>] <I>tag</I> <I>snapshot</I>...

<P>
<DL COMPACT><DT><DD>
Removes a single reference, named with the <I>tag</I> argument, from the specified snapshot or snapshots. The tag must already exist for each snapshot.
<P>
If a hold exists on a snapshot, attempts to destroy that snapshot by using the <B>zfs destroy</B> command return <B>EBUSY</B>.
<P>



<B>-r</B>

<P>
<DL COMPACT><DT><DD>
Recursively releases a hold with the given tag on the snapshots of all descendent file systems.
</DL>

<P>
</DL>

<P>
<P>



<B>zfs diff</B> [<B>-FHt</B>] <I>snapshot</I> <I>snapshot|filesystem</I>

<P>
<DL COMPACT><DT><DD>
Display the difference between a snapshot of a given filesystem and another
snapshot of that filesystem from a later time or the current contents of the
filesystem.  The first column is a character indicating the type of change,
the other columns indicate pathname, new pathname (in case of rename), change
in link count, and optionally file type and/or change time.
<P>
The types of change are:

<PRE>
-       The path has been removed
+       The path has been created
M       The path has been modified
R       The path has been renamed
</PRE>


<P>


<B>-F</B>

<P>
<DL COMPACT><DT><DD>
Display an indication of the type of file, in a manner similar to the <B>-F</B>
option of <B><A HREF="../man1/ls.1.html">ls</A></B>(1).

<PRE>
B       Block device
C       Character device
/       Directory
&gt;       Door
|       Named pipe
@       Symbolic link
P       Event port
=       Socket
F       Regular file
</PRE>


</DL>

<P>


<B>-H</B>

<P>
<DL COMPACT><DT><DD>
Give more parsable tab-separated output, without header lines and without arrows.
</DL>

<P>


<B>-t</B>

<P>
<DL COMPACT><DT><DD>
Display the path's inode change time as the first column of output.
</DL>

<P>
</DL>
<A NAME="lbAP">&nbsp;</A>
<H2>EXAMPLES</H2>

<P>

<B>Example 1 </B>Creating a ZFS File System Hierarchy
<P>
<P>

The following commands create a file system named <B>pool/home</B> and a file system named <B>pool/home/bob</B>. The mount point <B>/export/home</B> is set for the parent file system, and is automatically inherited by the child file system.
<P>
<P>

<PRE>
# <B>zfs create pool/home</B>
# <B>zfs set mountpoint=/export/home pool/home</B>
# <B>zfs create pool/home/bob</B>
</PRE>


<P>
<P>
<P>

<B>Example 2 </B>Creating a ZFS Snapshot
<P>
<P>

The following command creates a snapshot named <B>yesterday</B>. This snapshot is mounted on demand in the <B>.zfs/snapshot</B> directory at the root of the <B>pool/home/bob</B> file system.
<P>
<P>

<PRE>
# <B>zfs snapshot pool/home/bob@yesterday</B>
</PRE>


<P>
<P>
<P>

<B>Example 3 </B>Creating and Destroying Multiple Snapshots
<P>
<P>

The following command creates snapshots named <B>yesterday</B> of <B>pool/home</B> and all of its descendent file systems. Each snapshot is mounted on demand in the <B>.zfs/snapshot</B> directory at the root of its file system. The second command destroys the newly created snapshots.
<P>
<P>

<PRE>
# <B>zfs snapshot -r pool/home@yesterday</B>
# <B>zfs destroy -r pool/home@yesterday</B>
</PRE>


<P>
<P>
<P>

<B>Example 4 </B>Disabling and Enabling File System Compression
<P>
<P>

The following command disables the <B>compression</B> property for all file systems under <B>pool/home</B>. The next command explicitly enables <B>compression</B> for <B>pool/home/anne</B>.
<P>
<P>

<PRE>
# <B>zfs set compression=off pool/home</B>
# <B>zfs set compression=on pool/home/anne</B>
</PRE>


<P>
<P>
<P>

<B>Example 5 </B>Listing ZFS Datasets
<P>
<P>

The following command lists all active file systems and volumes in the system. Snapshots are displayed if the <B>listsnaps</B> property is <B>on</B>. The default is <B>off</B>. See <B><A HREF="../man8/zpool.8.html">zpool</A></B>(8) for more information on pool properties.
<P>
<P>

<PRE>
# <B>zfs list</B>
   NAME                      USED  AVAIL  REFER  MOUNTPOINT
   pool                      450K   457G    18K  /pool
   pool/home                 315K   457G    21K  /export/home
   pool/home/anne             18K   457G    18K  /export/home/anne
   pool/home/bob             276K   457G   276K  /export/home/bob
</PRE>


<P>
<P>
<P>

<B>Example 6 </B>Setting a Quota on a ZFS File System
<P>
<P>

The following command sets a quota of 50 Gbytes for <B>pool/home/bob</B>.
<P>
<P>

<PRE>
# <B>zfs set quota=50G pool/home/bob</B>
</PRE>


<P>
<P>
<P>

<B>Example 7 </B>Listing ZFS Properties
<P>
<P>

The following command lists all properties for <B>pool/home/bob</B>.
<P>
<P>

<PRE>
# <B>zfs get all pool/home/bob</B>
NAME           PROPERTY              VALUE                  SOURCE
pool/home/bob  type                  filesystem             -
pool/home/bob  creation              Tue Jul 21 15:53 2009  -
pool/home/bob  used                  21K                    -
pool/home/bob  available             20.0G                  -
pool/home/bob  referenced            21K                    -
pool/home/bob  compressratio         1.00x                  -
pool/home/bob  mounted               yes                    -
pool/home/bob  quota                 20G                    local
pool/home/bob  reservation           none                   default
pool/home/bob  recordsize            128K                   default
pool/home/bob  mountpoint            /pool/home/bob         default
pool/home/bob  sharenfs              off                    default
pool/home/bob  checksum              on                     default
pool/home/bob  compression           on                     local
pool/home/bob  atime                 on                     default
pool/home/bob  devices               on                     default
pool/home/bob  exec                  on                     default
pool/home/bob  setuid                on                     default
pool/home/bob  readonly              off                    default
pool/home/bob  zoned                 off                    default
pool/home/bob  snapdir               hidden                 default
pool/home/bob  acltype               off                    default
pool/home/bob  aclinherit            restricted             default
pool/home/bob  canmount              on                     default
pool/home/bob  shareiscsi            off                    default
pool/home/bob  xattr                 on                     default
pool/home/bob  copies                1                      default
pool/home/bob  version               4                      -
pool/home/bob  utf8only              off                    -
pool/home/bob  normalization         none                   -
pool/home/bob  casesensitivity       sensitive              -
pool/home/bob  vscan                 off                    default
pool/home/bob  nbmand                off                    default
pool/home/bob  sharesmb              off                    default
pool/home/bob  refquota              none                   default
pool/home/bob  refreservation        none                   default
pool/home/bob  primarycache          all                    default
pool/home/bob  secondarycache        all                    default
pool/home/bob  usedbysnapshots       0                      -
pool/home/bob  usedbydataset         21K                    -
pool/home/bob  usedbychildren        0                      -
pool/home/bob  usedbyrefreservation  0                      -
pool/home/bob  logbias               latency                default
pool/home/bob  dedup                 off                    default
pool/home/bob  mlslabel              none                   default
pool/home/bob  relatime              off                    default
</PRE>


<P>
<P>
<P>
<P>

The following command gets a single property value.
<P>
<P>

<PRE>
# <B>zfs get -H -o value compression pool/home/bob</B>
on
</PRE>


<P>
<P>
<P>
<P>

The following command lists all properties with local settings for <B>pool/home/bob</B>.
<P>
<P>

<PRE>
# <B>zfs get -r -s local -o name,property,value all pool/home/bob</B>
NAME           PROPERTY              VALUE
pool/home/bob  quota                 20G
pool/home/bob  compression           on
</PRE>


<P>
<P>
<P>

<B>Example 8 </B>Rolling Back a ZFS File System
<P>
<P>

The following command reverts the contents of <B>pool/home/anne</B> to the snapshot named <B>yesterday</B>, deleting all intermediate snapshots.
<P>
<P>

<PRE>
# <B>zfs rollback -r pool/home/anne@yesterday</B>
</PRE>


<P>
<P>
<P>

<B>Example 9 </B>Creating a ZFS Clone
<P>
<P>

The following command creates a writable file system whose initial contents are the same as <B>pool/home/bob@yesterday</B>.
<P>
<P>

<PRE>
# <B>zfs clone pool/home/bob@yesterday pool/clone</B>
</PRE>


<P>
<P>
<P>

<B>Example 10 </B>Promoting a ZFS Clone
<P>
<P>

The following commands illustrate how to test out changes to a file system, and then replace the original file system with the changed one, using clones, clone promotion, and renaming:
<P>
<P>

<PRE>
# <B>zfs create pool/project/production</B>
  populate /pool/project/production with data
# <B>zfs snapshot pool/project/production@today</B>
# <B>zfs clone pool/project/production@today pool/project/beta</B>
make changes to /pool/project/beta and test them
# <B>zfs promote pool/project/beta</B>
# <B>zfs rename pool/project/production pool/project/legacy</B>
# <B>zfs rename pool/project/beta pool/project/production</B>
once the legacy version is no longer needed, it can be destroyed
# <B>zfs destroy pool/project/legacy</B>
</PRE>


<P>
<P>
<P>

<B>Example 11 </B>Inheriting ZFS Properties
<P>
<P>

The following command causes <B>pool/home/bob</B> and <B>pool/home/anne</B> to inherit the <B>checksum</B> property from their parent.
<P>
<P>

<PRE>
# <B>zfs inherit checksum pool/home/bob pool/home/anne</B>
</PRE>


<P>
<P>

The following command causes <B>pool/home/bob</B> to revert to the received
value for the <B>quota</B> property if it exists.
<P>
<P>

<PRE>
# <B>zfs inherit -S quota pool/home/bob
</B></PRE>


<P>
<P>
<P>

<B>Example 12 </B>Remotely Replicating ZFS Data
<P>
<P>

The following commands send a full stream and then an incremental stream to a remote machine, restoring them into <B>poolB/received/fs@a</B>and <B>poolB/received/fs@b</B>, respectively. <B>poolB</B> must contain the file system <B>poolB/received</B>, and must not initially contain <B>poolB/received/fs</B>.
<P>
<P>

<PRE>
# <B>zfs send pool/fs@a | \</B>
   <B>ssh host zfs receive poolB/received/fs@a</B>
# <B>zfs send -i a pool/fs@b | ssh host \</B>
   <B>zfs receive poolB/received/fs</B>
</PRE>


<P>
<P>
<P>

<B>Example 13 </B>Using the <B>zfs receive</B> <B>-d</B> Option
<P>
<P>

The following command sends a full stream of <B>poolA/fsA/fsB@snap</A></B> to a remote machine, receiving it into <B>poolB/received/fsA/<A HREF="mailto:fsB@snap">fsB@snap</A></B>. The <B>fsA/<A HREF="mailto:fsB@snap">fsB@snap</B> portion of the received snapshot's name is determined from the name of the sent snapshot. <B>poolB</B> must contain the file system <B>poolB/received</B>. If <B>poolB/received/fsA</B> does not exist, it is created as an empty file system.
<P>
<P>

<PRE>
# <B>zfs send poolA/fsA/fsB@snap | \
   ssh host zfs receive -d poolB/received</B>
</PRE>


<P>
<P>
<P>

<B>Example 14 </B>Setting User Properties
<P>
<P>

The following example sets the user-defined <B>com.example:department</B> property for a dataset.
<P>
<P>

<PRE>
# <B>zfs set com.example:department=12345 tank/accounting</B>
</PRE>


<P>
<P>
<P>

<B>Example 15 </B>Creating a ZFS Volume as an iSCSI Target Device
<P>
<P>

The following example shows how to create a <B>ZFS</B> volume as an <B>iSCSI</B> target. 
<P>
<P>

<PRE>
# <B>zfs create -V 2g pool/volumes/vol1</B>
# <B>zfs set shareiscsi=on pool/volumes/vol1</B>
# <B>iscsitadm list target</B>
Target: pool/volumes/vol1
 iSCSI Name: 
 iqn.1986-03.com.sun:02:7b4b02a6-3277-eb1b-e686-a24762c52a8c
 Connections: 0
</PRE>


<P>
<P>
<P>
<P>

After the <B>iSCSI</B> target is created, set up the <B>iSCSI</B> initiator. For more information about the Solaris <B>iSCSI</B> initiator, see <B><A HREF="../man1M/iscsitadm.1M.html">iscsitadm</A></B>(1M).
<P>

<B>Example 16 </B>Performing a Rolling Snapshot
<P>
<P>

The following example shows how to maintain a history of snapshots with a consistent naming scheme. To keep a week's worth of snapshots, the user destroys the oldest snapshot, renames the remaining snapshots, and then creates a new snapshot, as follows:
<P>
<P>

<PRE>
# <B>zfs destroy -r pool/users@7daysago</B>
# <B>zfs rename -r pool/users@6daysago @7daysago</B>
# <B>zfs rename -r pool/users@5daysago @6daysago</B>
# <B>zfs rename -r pool/users@4daysago @5daysago</B>
# <B>zfs rename -r pool/users@3daysago @4daysago</B>
# <B>zfs rename -r pool/users@2daysago @3daysago</B>
# <B>zfs rename -r pool/users@yesterday @2daysago</B>
# <B>zfs rename -r pool/users@today @yesterday</B>
# <B>zfs snapshot -r pool/users@today</B>
</PRE>


<P>
<P>
<P>

<B>Example 17 </B>Setting <B>sharenfs</B> Property Options on a ZFS File System
<P>
<P>

The following commands show how to set <B>sharenfs</B> property options to enable <B>rw</B> access for a set of <B>IP</B> addresses and to enable root access for system <B>neo</B> on the <B>tank/home</B> file system.
<P>
<P>

<PRE>
# <B>zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home</B>
</PRE>


<P>
<P>
<P>
<P>

If you are using <B>DNS</B> for host name resolution, specify the fully qualified hostname.
<P>
<P>

<B>Example 18 </B>Delegating ZFS Administration Permissions on a ZFS Dataset
<P>
<P>

The following example shows how to set permissions so that user <B>cindys</B> can create, destroy, mount, and take snapshots on <B>tank/cindys</B>. The permissions on <B>tank/cindys</B> are also displayed.
<P>
<P>

<PRE>
# <B>zfs allow cindys create,destroy,mount,snapshot tank/cindys</B>
# <B>zfs allow tank/cindys</B>
-------------------------------------------------------------
Local+Descendent permissions on (tank/cindys)
          user cindys create,destroy,mount,snapshot
-------------------------------------------------------------
</PRE>


<P>
<P>
<P>
<P>

Because the <B>tank/cindys</B> mount point permission is set to 755 by default, user <B>cindys</B> will be unable to mount file systems under <B>tank/cindys</B>. Set an <B>ACL</B> similar to the following syntax to provide mount point access:
<P>

<PRE>
# <B>chmod A+user:cindys:add_subdirectory:allow /tank/cindys</B>
</PRE>


<P>
<P>
<P>

<B>Example 19 </B>Delegating Create Time Permissions on a ZFS Dataset
<P>
<P>

The following example shows how to grant anyone in the group <B>staff</B> to create file systems in <B>tank/users</B>. This syntax also allows staff members to destroy their own file systems, but not destroy anyone else's file system. The permissions on <B>tank/users</B> are also displayed.
<P>
<P>

<PRE>
# <B>zfs allow staff create,mount tank/users</B>
# <B>zfs allow -c destroy tank/users</B>
# <B>zfs allow tank/users</B>
-------------------------------------------------------------
Create time permissions on (tank/users)
          create,destroy
Local+Descendent permissions on (tank/users)
          group staff create,mount
------------------------------------------------------------- 
</PRE>


<P>
<P>
<P>

<B>Example 20 </B>Defining and Granting a Permission Set on a ZFS Dataset
<P>
<P>

The following example shows how to define and grant a permission set on the <B>tank/users</B> file system. The permissions on <B>tank/users</B> are also displayed.
<P>
<P>

<PRE>
# <B>zfs allow -s @pset create,destroy,snapshot,mount tank/users</B>
# <B>zfs allow staff @pset tank/users</B>
# <B>zfs allow tank/users</B>
-------------------------------------------------------------
Permission sets on (tank/users)
        @pset create,destroy,mount,snapshot
Create time permissions on (tank/users)
        create,destroy
Local+Descendent permissions on (tank/users)
        group staff @pset,create,mount
-------------------------------------------------------------
</PRE>


<P>
<P>
<P>

<B>Example 21 </B>Delegating Property Permissions on a ZFS Dataset
<P>
<P>

The following example shows to grant the ability to set quotas and reservations on the <B>users/home</B> file system. The permissions on <B>users/home</B> are also displayed.
<P>
<P>

<PRE>
# <B>zfs allow cindys quota,reservation users/home</B>
# <B>zfs allow users/home</B>
-------------------------------------------------------------
Local+Descendent permissions on (users/home)
        user cindys quota,reservation
-------------------------------------------------------------
cindys% <B>zfs set quota=10G users/home/marks</B>
cindys% <B>zfs get quota users/home/marks</B>
NAME              PROPERTY  VALUE             SOURCE
users/home/marks  quota     10G               local 
</PRE>


<P>
<P>
<P>

<B>Example 22 </B>Removing ZFS Delegated Permissions on a ZFS Dataset
<P>
<P>

The following example shows how to remove the snapshot permission from the <B>staff</B> group on the <B>tank/users</B> file system. The permissions on <B>tank/users</B> are also displayed.
<P>
<P>

<PRE>
# <B>zfs unallow staff snapshot tank/users</B>
# <B>zfs allow tank/users</B>
-------------------------------------------------------------
Permission sets on (tank/users)
        @pset create,destroy,mount,snapshot
Create time permissions on (tank/users)
        create,destroy
Local+Descendent permissions on (tank/users)
        group staff @pset,create,mount
------------------------------------------------------------- 
</PRE>


<P>
<P>
<P>

<B>Example 23</B> Showing the differences between a snapshot and a ZFS Dataset
<P>
<P>

The following example shows how to see what has changed between a prior
snapshot of a ZFS Dataset and its current state.  The <B>-F</B> option is used
to indicate type information for the files affected.
<P>
<P>

<PRE>
# zfs diff -F tank/test@before tank/test
M       /       /tank/test/
M       F       /tank/test/linked      (+1)
R       F       /tank/test/oldname -&gt; /tank/test/newname
-       F       /tank/test/deleted
+       F       /tank/test/created
M       F       /tank/test/modified
</PRE>


<P>
<P>
<P>

<B>Example 24</B> Creating a bookmark
<P>
<P>

The following example create a bookmark to a snapshot. This bookmark can then
be used instead of snapshot in send streams.
<P>
<P>

<PRE>
# zfs bookmark rpool@snapshot rpool#bookmark
</PRE>


<P>
<P>
<A NAME="lbAQ">&nbsp;</A>
<H2>ENVIRONMENT VARIABLES</H2>

<DL COMPACT>
<DT><B>ZFS_ABORT</B>

<DD>
Cause <B>zfs</B> to dump core on exit for the purposes of running <B>::findleaks</B>.
<P>
</DL>
<A NAME="lbAR">&nbsp;</A>
<H2>EXIT STATUS</H2>

<P>

The following exit values are returned:
<P>



<B>0</B>

<P>
<DL COMPACT><DT><DD>
Successful completion. 
</DL>

<P>
<P>



<B>1</B>

<P>
<DL COMPACT><DT><DD>
An error occurred.
</DL>

<P>
<P>



<B>2</B>

<P>
<DL COMPACT><DT><DD>
Invalid command line options were specified.
</DL>

<P>
<A NAME="lbAS">&nbsp;</A>
<H2>SEE ALSO</H2>

<P>

<B><A HREF="../man2/chmod.2.html">chmod</A></B>(2), <B><A HREF="../man2/fsync.2.html">fsync</A></B>(2), <B><A HREF="../man1/gzip.1.html">gzip</A></B>(1), <B><A HREF="../man8/mount.8.html">mount</A></B>(8), <B><A HREF="../man1/ssh.1.html">ssh</A></B>(1), <B><A HREF="../man2/stat.2.html">stat</A></B>(2), <B><A HREF="../man2/write.2.html">write</A></B>(2), <B><A HREF="../man8/zpool.8.html">zpool</A></B>(8)
<P>

</BODY>
</HTML>
